Hi Lat9. yes its me again 
ZC2.1
PHP 8.3
authorizenet_merchant_seal_2.0
customer_tax_exempt_2.0.2
edit_orders-5.0.0
sitemapxml-master-4.0.3
usps-USPS_2024_08_25_K11l
zen_TyPackageTracker-5.0.0
I installed the latest github release of sitemapxml yesterday and got this debug log overnight:
Code:
[22-Feb-2025 05:00:06 America/Boise] Request URI: not set, IP address: 127.0.0.1, Language id not set
#0 [internal function]: zen_debug_error_handler()
#1 //public_html/includes/init_includes/init_sessions.php(36): dirname()
#2 //public_html/includes/autoload_func.php(40): require_once('/...')
#3 //public_html/includes/application_top.php(329): require('/...')
#4 //public_html/index.php(25): require('/...')
#5 //public_html/cgi-bin/sitemapxml.php(74): require('/...')
--> PHP Deprecated: dirname(): Passing null to parameter #1 ($path) of type string is deprecated in //public_html/includes/init_includes/init_sessions.php on line 36.
[22-Feb-2025 05:00:06 America/Boise] Request URI: not set, IP address: 127.0.0.1, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 //public_html/includes/classes/navigation_history.php(38): preg_match()
#2 //public_html/includes/autoload_func.php(62): navigationHistory->add_current_page()
#3 //public_html/includes/application_top.php(329): require('/...')
#4 //public_html/index.php(25): require('/...')
#5 //public_html/cgi-bin/sitemapxml.php(74): require('/...')
--> PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in //public_html/includes/classes/navigation_history.php on line 38.
[22-Feb-2025 05:00:06 America/Boise] Request URI: not set, IP address: 127.0.0.1, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 //public_html/includes/init_includes/init_customer_auth.php(83): preg_match()
#2 //public_html/includes/autoload_func.php(40): require_once('/...')
#3 //public_html/includes/application_top.php(329): require('/...')
#4 //public_html/index.php(25): require('/...')
#5 //public_html/cgi-bin/sitemapxml.php(74): require('/...')
--> PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in //public_html/includes/init_includes/init_customer_auth.php on line 83.
[22-Feb-2025 05:00:06 America/Boise] Request URI: not set, IP address: 127.0.0.1, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 //public_html/includes/init_includes/init_customer_auth.php(84): preg_match()
#2 //public_html/includes/autoload_func.php(40): require_once('/...')
#3 //public_html/includes/application_top.php(329): require('/...')
#4 //public_html/index.php(25): require('/...')
#5 //public_html/cgi-bin/sitemapxml.php(74): require('/...')
--> PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in //public_html/includes/init_includes/init_customer_auth.php on line 84.
[22-Feb-2025 05:00:06 America/Boise] Request URI: not set, IP address: 127.0.0.1, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 //public_html/includes/init_includes/init_customer_auth.php(139): preg_match()
#2 //public_html/includes/autoload_func.php(40): require_once('/...')
#3 //public_html/includes/application_top.php(329): require('/...')
#4 //public_html/index.php(25): require('/...')
#5 //public_html/cgi-bin/sitemapxml.php(74): require('/...')
--> PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in //public_html/includes/init_includes/init_customer_auth.php on line 139.
[22-Feb-2025 05:00:06 America/Boise] Request URI: not set, IP address: 127.0.0.1, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 //public_html/includes/init_includes/init_customer_auth.php(140): preg_match()
#2 //public_html/includes/autoload_func.php(40): require_once('/...')
#3 //public_html/includes/application_top.php(329): require('/...')
#4 //public_html/index.php(25): require('/...')
#5 //public_html/cgi-bin/sitemapxml.php(74): require('/...')
--> PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in //public_html/includes/init_includes/init_customer_auth.php on line 140.
[22-Feb-2025 05:00:06 America/Boise] Request URI: not set, IP address: 127.0.0.1, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 //public_html/includes/functions/whos_online.php(13): preg_match()
#2 //public_html/includes/init_includes/init_special_funcs.php(18): zen_update_whos_online()
#3 //public_html/includes/autoload_func.php(40): require_once('/...')
#4 //public_html/includes/application_top.php(329): require('/...')
#5 //public_html/index.php(25): require('/...')
#6 //public_html/cgi-bin/sitemapxml.php(74): require('/...')
--> PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in //public_html/includes/functions/whos_online.php on line 13.
1) Usually I see my true ip address on the first line of each paragraph:
"[22-Feb-2025 05:00:06 America/Boise] Request URI: not set, IP address: 127.0.0.1, Language id 1"
Does this indicate that I have something setup wrong and that is what is causing this issue?
OR
2) While it appears that sitemapxml is involved in each of these issues it appears that the issue is within files outside of sitemapxml.
It appears to be an issue with coding in each of the files pertaining to the passing of null to a parameter.
Can I just implement the following solution, courtesy of
www.php.cn, to each incident to correct this issue:
"The null coalescing operator (??) can be employed to provide a default value when null is encountered. For example, htmlspecialchars($something) can be modified to htmlspecialchars($something ?? ''). This ensures that an empty string is returned when null is passed."
For example:
Code:
$path = str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME']));
Could I just change this to the following in each incident?
Code:
$path = str_replace('\\', '/', dirname($_SERVER ?? ''['SCRIPT_NAME']));
Bookmarks