Menu

#2960 PHP 8.1.1 deprecations - Take 5

v4.3.1
closed-fixed
deprecated (3)
3
2022-01-18
2022-01-14
GaryT
No

Sorry, I was a bit late replying to 8.1.1V4 - I was still away.

Now I'm home, I've tried to recreate the corrections on my home machine server, as I don't want to do a clean SVN, as I have some edits from my map modifications. Hopefully that doesn't complicate things.

Parse error: syntax error, unexpected token "!=" in \includes\classes\class_reportbase.php(2865) : eval()'d code on line 1
This line looks like it is actually eval'ing a numeric expression, so on line 2860 I modified your edit, and changed $value = '' to $value = 0
Then I got:
Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in \includes\classes\class_reportbase.php on line 495
and another few:
Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in \includes\classes\class_gedcomrecord.php on line 157
Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in \includes\functions\functions_export.php on line 235
Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in \includes\functions\functions_print.php on line 1658
Deprecated: htmlentities(): Passing null to parameter #1 ($string) of type string is deprecated in \login.php on line 208

Discussion

<< < 1 2 (Page 2 of 2)
  • Tomasz Babczyński

    I have no time today to check the database. Tomorrow.
    but say, do you remember what was the reason of deprecation in 2308 line of the reportbase file:
    `function PGVRRepeatTagSHandler($attrs) {

    /**
    * @deprecated Today is 2021-01-29. Remove this if not causing problems
    * global $repeats, $repeatsStack, $gedrec, $repeatBytes, $parser, $parserStack, $processRepeats, $currentElement, $fact, $desc;
    */
    
    global $repeats, $repeatsStack, $gedrec, $repeatBytes, $parser, $processRepeats, $fact, $desc;
    

    `
    the currentElement is pointed as undefined by my ide

     

    Last edit: Tomasz Babczyński 2022-01-17
  • Gerry Kroll

    Gerry Kroll - 2022-01-17

    Tomasz:
    With regards to the "deprecated" info lines in class_reportbase.php :
    The line numbers I quote refer to the version of this file contained in the most recent FixPGV5.zip. This file is being replaced to correct the missing global definition noted at line 2310, below. The other "deprecated" notices indicated below will be removed later.

    Line 2135 refers to the commented-out global line following. The variables $gedrecStack, $SHOW_ID_NUMBERS are not used in this function, and the variable $pgv_lang is conditionally defined at line 2168.

    Line 2223 refers to the commented-out global line following. The variables $vars, $gedrecStack, $type, $SHOW_PEDIGREE_PLACES, $pgv_lang are not used in this function.

    Line 2310 refers to the commented-out global line following. The variable $parserStack is not used in this function. The omission of the variable $currentElement from the active global list at line 2313 is an error; it is used at line 2339. This will be corrected in the next iteration of FixPGV5.zip.

    Line 2410 refers to the commented-out statement following. The variable $line is not used in this function.

    Line 2499 refers to the commented-out global line following. The variables $gedrec, $gedrecStack are not used in this function.

    Line 2574 refers to the commented-out global line following. The variable $parserStack is not used in this function.

    Line 2742 refers to the commented-out global line following. The variable $gedrecStack is not used in this function.

    Line 2926 refers to the commented-out global line following. The variable $gedrec is not used in this function.

    Line 3579 refers to the commented-out statement following. The variable $line is not used in this function.

    Line 3827 refers to the commented-out statement following. The variable $line is not used in this function.

     
  • GaryT

    GaryT - 2022-01-17

    Well I'm listening, and impressed.
    Whereas I've never been a professional programmer. But I learnt Pascal at school using marksense cards, and went out specially to buy a B5 pencil that would make a readable mark with just one stroke.
    And I used to run a machine at work that ran on a PDP-8 that had an intermittent core memory fault. That meant that I had to reload the papertape bootstrap routine on the front panel toggle switches fairly regularly. I used to know those 20-odd codes off by heart: 6014,6011,7375... maybe? I just looked it up... 5357 actually... How far we've come...

     
  • Gerry Kroll

    Gerry Kroll - 2022-01-18

    Gary:
    Please let me know whether the latest-and-greatest FixPGV5.zip cures your PDO problem.

    As usual, any additional "observations" or "undocumented features" should be reported against these files. (Back in the day, we never had "bugs" -- we had "undocumented features".)

     
  • GaryT

    GaryT - 2022-01-18

    Sorry. Yes it is fixed.
    I thought I had edited my comment after posting it.
    I'm happy to close this one if you are.

     
  • Gerry Kroll

    Gerry Kroll - 2022-01-18
    • status: open --> closed-fixed
     
  • Gerry Kroll

    Gerry Kroll - 2022-01-18

    Fixed in SVN 7329.

    Any more errors should be reported in a new thread. Please use "take 6"

     
<< < 1 2 (Page 2 of 2)

Log in to post a comment.