I've done a bit of testing, cutting, pasting, sorting, duplicate removal, ... Errors edited to remove base of files.
Deprecated: Automatic conversion of false to array is deprecated in includes\functions\functions_mediadb.php on line 1630
Deprecated: Implicit conversion from float 2.52 to int loses precision in includes\classes\class_stats.php on line 3822
Deprecated: Implicit conversion from float 2.52 to int loses precision in includes\classes\class_stats.php on line 3823
Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in includes\functions\functions_print.php on line 2096
Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in includes\classes\class_date.php on line 986
Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in includes\classes\class_gedcomrecord.php on line 71
Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in includes\functions\functions_privacy.php on line 829
Deprecated: preg_match_all(): Passing null to parameter #2 ($subject) of type string is deprecated in includes\classes\class_event.php on line 78
Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in includes\functions\functions_print.php on line 2186
Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in individual.php on line 86
Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in includes\functions\functions_mediadb.php on line 700
Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in includes\functions\functions_print.php on line 375
Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in includes\functions\functions.php on line 3638
Deprecated: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in includes\controllers\individual_ctrl.php on line 145
Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in includes\classes\class_date.php on line 994
Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in includes\functions\functions_mediadb.php on line 243
Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in includes\functions\functions_mediadb.php on line 244
Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in includes\functions\functions_edit.php on line 1302
Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in includes\classes\class_gedcomrecord.php on line 837
Phew!
(Thanks a bunch, you blasted PHP "developers". Not a very nice Xmas present.)
This lot may take a while to sort. Stay tuned. Any new ones, please start another thread.
Please try the attached.
I'm not sure about some of the fixes; they could introduce other errors that are not necessarily related to PHP 8.1.1 -- particularly the Print and Edit functions. Some of the logic is weird (NOT!! my code, of course.)
Please be sure to start a new thread when you discover errors. This helps keep things straight. Thanks.
Thanks, unfortunately you were right:
( I take it subsequent problems such as this should go here until this lot is fixed?)
ERROR 2: Attempt to read property "minJD" on null
0 Error occurred on line 1214 of file class_date.php in function MinJD
1 called from line 1295 of file class_date.php in function Compare
2 called from line 2166 of file functions_print.php in function format_fact_date
3 called from line 332 of file class_event.php in function print_simple_fact
4 called from line 203 of file ancestry_ctrl.php in function print_child_ascendancy
5 called from line 202 of file ancestry.php
Warning: Attempt to read property "minJD" on null in C:\Users\OEM\Documents\phpgedview-svn-r7322-trunk-phpGedView\includes\classes\class_date.php on line 1214
ERROR 2: Attempt to read property "maxJD" on null
0 Error occurred on line 1218 of file class_date.php in function MaxJD
1 called from line 1296 of file class_date.php in function Compare
2 called from line 2166 of file functions_print.php in function format_fact_date
3 called from line 332 of file class_event.php in function print_simple_fact
4 called from line 203 of file ancestry_ctrl.php in function print_child_ascendancy
5 called from line 202 of file ancestry.php
Warning: Attempt to read property "maxJD" on null in C:\Users\OEM\Documents\phpgedview-svn-r7322-trunk-phpGedView\includes\classes\class_date.php on line 1218
Please try the attached. File /includes/classes/class_date.php has been changed, the rest are the same.
NO GUARANTEES!! The whole works will probably fall apart, particularly in the area of date manipulation. I can't BEGIN to follow the way the program deals with dates, so I'm using the "sledgehammer" approach.
Unless I hear otherwise, I'll update the SVN repository with this stuff at 00:00 GMT, 31 Dec. 2021.
Any new "observations" (there are bound to be more) should be posted in a new thread after that.
Sorry, it's our summer holidays here, so it has been a little difficult to keep up.
~~~
Fatal error: Uncaught Error: Call to a member function GetAge() on null in C:\Users\OEM\Documents\phpgedview-svn-r7322-trunk-phpGedView\includes\classes\class_date.php:1246
Stack trace:
0 C:\Users\OEM\Documents\phpgedview-svn-r7322-trunk-phpGedView\includes\functions\functions_print.php(2033): GedcomDate::GetAgeYears(Object(GedcomDate), Object(GedcomDate))
1 C:\Users\OEM\Documents\phpgedview-svn-r7322-trunk-phpGedView\includes\functions\functions_print.php(2114): format_parents_age('I8', Object(GedcomDate))
2 C:\Users\OEM\Documents\phpgedview-svn-r7322-trunk-phpGedView\includes\classes\class_event.php(332): format_fact_date(Object(Event), false, false, true)
3 C:\Users\OEM\Documents\phpgedview-svn-r7322-trunk-phpGedView\includes\functions\functions_print.php(393): Event->print_simple_fact(true)
4 C:\Users\OEM\Documents\phpgedview-svn-r7322-trunk-phpGedView\pedigree.php(274): print_pedigree_person('I8', 1, true, 12, 1)
5
thrown in C:\Users\OEM\Documents\phpgedview-svn-r7322-trunk-phpGedView\includes\classes\class_date.php< on line 1246
~~~
Fatal error: Uncaught Error: Call to a member function GetAge() on null in C:\Users\OEM\Documents\phpgedview-svn-r7322-trunk-phpGedView\includes\classes\class_date.php:1257 Stack trace: #0 C:\Users\OEM\Documents\phpgedview-svn-r7322-trunk-phpGedView\includes\functions\functions_print.php(2148): GedcomDate::GetAgeGedcom(Object(GedcomDate), Object(GedcomDate)) #1 C:\Users\OEM\Documents\phpgedview-svn-r7322-trunk-phpGedView\includes\classes\class_gedcomrecord.php(692): format_fact_date(Object(Event)) #2 C:\Users\OEM\Documents\phpgedview-svn-r7322-trunk-phpGedView\includes\classes\class_person.php(1843): GedcomRecord->format_first_major_fact('BIRT|CHR|BAPM|_...', 1) #3 C:\Users\OEM\Documents\phpgedview-svn-r7322-trunk-phpGedView\includes\classes\class_gedcomrecord.php(673): Person->format_list_details() #4 C:\Users\OEM\Documents\phpgedview-svn-r7322-trunk-phpGedView\includes\classes\class_stats.php(987): GedcomRecord->format_list('span', false, 'John Goldfinch') #5 C:\Users\OEM\Documents\phpgedview-svn-r7322-trunk-phpGedView\includes\classes\class_stats.php(1437): stats->_mortalityQuery('full', 'ASC', 'BIRT') #6 C:\Users\OEM\Documents\phpgedview-svn-r7322-trunk-phpGedView\blocks\gedcom_stats.php(157): stats->firstBirth() #7 C:\Users\OEM\Documents\phpgedview-svn-r7322-trunk-phpGedView\index.php(308) : eval()'d code(1): print_gedcom_stats(false, Array, 'main', 1) #8 C:\Users\OEM\Documents\phpgedview-svn-r7322-trunk-phpGedView\index.php(308): eval() #9 {main} thrown in C:\Users\OEM\Documents\phpgedview-svn-r7322-trunk-phpGedView\includes\classes\class_date.php on line 1257
SVN was updated to revision 7324 at midnight (GMT) this morning, 31 Dec. 2021. The updates consisted of all the files in the ZIP file FixPGV2.zip.
Because of the timing, this latest error in class_date.php should have been reported in a new thread. However, a user in the Netherlands also reported this same error, and I've updated that user's site to see whether the problem goes away.
Gary:
Try the f ix posted in bug report 2958. According to the user in the Netherlands, this seems to fix the problem.