svn-r7381 on PHP8.3 is reporting:
Deprecated: Using ${var} in strings is deprecated, use {$var} instead
.../blocks/user_messages.php on line 97
.../includes/functions/functions_export.php on line 135,142
(Most? of these relate to ${TBLPREFIX} so perhaps a global search and replace might be useful?)
.../modules/googlemap/places.php on line 198,202
...//includes/classes/class_stats.php on line 1019,1025,2778,2794
A few others in the error log:
PHP Deprecated: preg_match_all(): Passing null to parameter #2 ($subject) of type string is deprecated in.../includes/classes/class_event.php on line 78
PHP Warning: Attempt to read property "y" on null in .../includes/classes/class_event.php on line 358
PHP Fatal error: Uncaught Error: Call to a member function Format() on null in .../includes/classes/class_person.php:268
PHP Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in .../themes/standard/header.php on line 44
PHP Deprecated: file_exists(): Passing null to parameter #1 ($filename) of type string is deprecated in .../editgedcoms.php on line 171
PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in .../includes/functions/functions_print.php on line 828
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function starredName(), 1 passed in ,,,/includes/authentication.php on line 263 and exactly 2 expected in .../includes/functions/functions_rtl.php:502
Stack trace: #0 .../includes/authentication.php(263): starredName('Gary Turner')
that'll do for now...
Thank you.
I can't find all errors you have reported in my copy of SVN 7381, but several of them actually DO exist, and will be corrected soon. Stay tuned.
It appears that you're using some software that launches PHP scripts without going through scripts that establish prior conditions. I had a user in Australia who used software to "test" PHP scripts: LOTS of errors that all went away when he stopped using this software and just used PhpGedView the way it was intended to be used.
Are you actually using Googlemaps? It's not properly supported in PGV, and there are some folks who are trying to implement support for the current version of Googlemaps.
How about RSS?
Googlemaps have more to do with JavaScript than PHP. Anyway, in the current version, if the user has valid google api key, the maps should work properly. I mean, the version after jQuery update from the last year.
I wish, I have more time to migrate maps to leaflet engine ...
T.B.
Tomasz:
Thank you for the reminder and clarification. As you know, I don't use Googlemaps, so am flying blind in this respect.
The errors that Gary reported will be fixed soon.
@Gerry: can you explain why you think that I'm scripting or similar? AFAIK I'm using it in a standard way: SVN unzipped in a folder on a commercial shared hosting website. The host does run a multiphp environment, if that is relevant. I also (hopefully obviously) edited the messages to remove irrelevant paths.
@Tomasz - a while back I actually got a leaflet version of Googlemaps working - to a degree at least. It was quite hacky, and there were quite a few changes to make on the base svn code to hook it in, which is something I believe you were working on factoring out to simplify that. I can't remember if I sent that to you or not. I can maybe dig it out if you were interested.
@Gerry/Tomasz - something we discussed back then was removing 'Google' references from the name of the mapping plugin for copyright reasons. Was that something that was ever progressed? Sorry, I lost the plot on all this when I got a diagnosis back then.
Gary:
Please try applying a set of corrections you can download from my site:
https://keldine.ca/FixPGV50.zip
This set of fixes assumes that you have already installed the complete PGV, and not just a pick-and-choose selection of PGV scripts.
The following comments apply to your inital observations:
Deprecated: Using ${var} in strings is deprecated, use {$var} instead
.../blocks/user_messages.php on line 97
Agreed. Fix was already in the queue for the next SVN update
.../includes/functions/functions_export.php on line 135,142
No. SVN 7378, dated 2024-11-02 already contains this fix
.../modules/googlemap/places.php on line 198,202
Agreed. Fix will be in the next SVN update
...//includes/classes/class_stats.php on line 1019,1025,2778,2794
No. SVN 7378, dated 2024-11-02 already contains this fix
preg_match_all(): Passing null to parameter #2 ($subject) of type string is deprecated in.../includes/classes/class_event.php on line 78
No. SVN 7376, dated 2024-09-17 contains a fix for this
PHP Warning: Attempt to read property "y" on null in .../includes/classes/class_event.php on line 358
No. SVN 7376, dated 2024-09-17 contains a fix for this
PHP Fatal error: Uncaught Error: Call to a member function Format() on null in .../includes/classes/class_person.php:268
No. SVN 7373, dated 2024-02-07 contains a fix for this
htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in .../themes/standard/header.php on line 44
No. This line refers to the global variable $GEDCOM_TITLE that is defined as part of the GEDCOM configuration. I don't see how this can
ever be NULL if the GEDCOM configuration was completed properly and if the PGV installation is permitted sufficient memeory.
The GEDCOM configuration is stored in a file in the index directory.
file_exists(): Passing null to parameter #1 ($filename) of type string is deprecated in .../editgedcoms.php on line 171
No. This line refers to the variable "path" stored in a database table. As above, this can't be NULL if the GEDCOM configuration
was completed successfully.
strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in .../includes/functions/functions_print.php on line 828
No. This line refers to the contact user ID stored in the GEDCOM configuration. As above, this can't be NULL if the GEDCOM configuration
was completed successfully.
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function starredName(), 1 passed in ,,,/includes/authentication.php on line 263
Not sure. This appears to be a PHP language change where NULL is not allowed to be made a default for parameters that are missing in
the function call. functions_name.php changed to use a default empty value instead of NULL.
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments. exactly 2 expected in .../includes/functions/functions_rtl.php:502
Not sure. All calls to getChar() in the functions_rtl.php script have exactly 2 arguments, but a couple have the value 0 (zero). It seems
that this is a bug in PHP, where zero is not treated properly. I'll try specifically type-casting the second parameter ($offset) to (int).
Maybe that will fix the problem.
I'm so sorry to put all that unnecessary work on you.
I wonder if perhaps I got a cached version of the log? Or the server cached some of the php files? Or maybe I didn't adequately check the timestamps and perhaps some of those were during the transition. Interpreting timestamps that are 'out' by 13 hours isn't particularly intuitive, particularly given the different day.
I'm happy to try out some of those last solutions here, assuming I can replicate them, if that helps.
A couple of new messages:
PHP Deprecated: Creation of dynamic property AncestryController::$ancestry is deprecated in .../genealogy/includes/controllers/ancestry_ctrl.php on line 109
PHP Deprecated: Creation of dynamic property DescendancyController::$view is deprecated in .../genealogy/includes/controllers/descendancy_ctrl.php on line 107
I double checked this. It looks like the date codes for descendancy_ctrl are the same on my version and the svn (7354 2022-10-27)
Also:
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in .../compact.php on line 57
I just did a grep to see what matches to ${var} it found. ( Actually matching \${[a-zA-Z0-9_]*} ).
Apart from stuff in DemoBase and and hooks/pre-(un)lock which I'm not sure are relevant, it found the above ones, and these:
phpGedView/editconfig_gedcom.php:267: $gedcom_config = "\${INDEX_DIRECTORY}".$FILE."_conf.php";
phpGedView/editconfig_gedcom.php:271: $gedcom_privacy = "\${INDEX_DIRECTORY}".$FILE."_priv.php";
phpGedView/editconfig_gedcom.php:274: $gedcom_privacy = "\${INDEX_DIRECTORY}".$FILE."_priv.php";
phpGedView/edit_quickupdate.php:1818: ["ADDR"]; ?><input type="text" \<?php="" if="" ($text_direction="="rtl"" &&="" !hasrtltext($adr1))="" echo="" "dir="\"ltr\"";" ?=""> name="ADDR" size="35" value="\" />
phpGedView/includes/functions/functions.php:219: $config=str_replace('${INDEX_DIRECTORY}', $INDEX_DIRECTORY, $config);
phpGedView/includes/functions/functions.php:287: $privfile=str_replace('${INDEX_DIRECTORY}', $INDEX_DIRECTORY, $privfile);
Up to you as to whether these are relevant/live code.
Please download a replacement FixPGV50.zip:
https://keldine.ca/FixPGV50.zip
The attempt to correct the problem in functions_rtl.php didn't work because the (int) was in the wrong place.
The following responses to your observations above are in addition to what was already posted.
Deprecated: Creation of dynamic property AncestryController::$ancestry is deprecated in ancestry_ctrl.php on line 109
Agreed. Declaration of $ancestry variable missing in the class declaration. Fix will be in the next SVN update.
Deprecated: Creation of dynamic property DescendancyController::$view is deprecated in descendancy_ctrl.php on line 107
Agreed. Declaration of $view variable missing in the class declaration. Fix will be in the next SVN update.
edit_quickupdate.php line 1818 contains the construct: ${1}
Agreed. This is an old-style regular expression backreference; it should be "\1". Fix will be in the next SVN update.
functions.php lines 219 and 287 contain the construct: ${INDEX_DIRECTORY}
Correct, but this string is part of a string replace that refers to a value from a database table and therefore should
not be corrected. However, in the interests of clarity, this construct should be avoided.
editconfig_gedcom.php lines 267, 271, and 274 contain the construct: ${INDEX_DIRECTORY}
Correct, but this string is part of a string value in a database table that is referenced in functions.php and therefore should
not be corrected. However, in the interests of clarity, this construct should be avoided.
Thanks. Getting there hopefully...
Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in .../modules/googlemap/places_edit.php on line 782
Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in .../modules/googlemap/places_edit.php on line 788
A replacement complete update file
https://keldine.ca/FixPGV50.zip
contains a new file /modules/googlemap/places_edit.php to correct this problem. The rest of this update file is not changed.
As in the past, you'll have to test this yourself -- I don't use GoogleMaps.
Thanks. Of course.
PHP Deprecated: Creation of dynamic property HourglassController::$hourPerson is deprecated in .../includes/controllers/hourglass_ctrl.php on line 120
A replacement complete update file
https://keldine.ca/FixPGV50.zip
contains a new file /includes/controllers/hourglass_ctrl.php to correct this problem. The rest of this update file is not changed.
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home4/elizrcom/public_html/genealogy/compact.php on line 57
Definitely getting much less messages now!
A replacement complete update file
https://keldine.ca/FixPGV50.zip
contains a new file compact.php to correct this problem. Except as noted below, the rest of this update file is not changed.
New file: gedcheck.php
New file: modules/research_assistant/forms/ra_form.php
The gedcheck script is useful to verify that your GEDCOM file (not the database) conforms to the published GEDCOM 5.1 standard.
For various reasons, I generally don't recommend that the research_assistant module be installed.
SVN has been updated to revision 7382.
Please start a new thread if you find any more problems.