nicksab:
Sitemap 4.02
ZC 2.0.1
Php 8.3
Not really a big issue but I am getting a depreciated log.
[22-Nov-2024 16:21:15 America/Los_Angeles] Request URI: /index.php?main_page=sitemapxml&rebuild=yes, IP address: 98.45.172.132, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 /includes/classes/sitemapxml.php(225): strtotime()
#2 /includes/modules/pages/sitemapxml/sitemapxml_products_reviews.php(37): zen_SiteMapXML->writeItem()
#3 /includes/templates/template_default/sitemapxml/tpl_main_page.php(21): require('/home/zch1akhw6...')
#4 /index.php(95): require('/home/zch1akhw6...')
--> PHP Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /includes/classes/sitemapxml.php on line 225.
[22-Nov-2024 16:21:15 America/Los_Angeles] Request URI: /index.php?main_page=sitemapxml&rebuild=yes, IP address: 98.45.172.132, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 /includes/classes/sitemapxml.php(225): strtotime()
#2 /includes/modules/pages/sitemapxml/sitemapxml_products_reviews.php(37): zen_SiteMapXML->writeItem()
#3 /includes/templates/template_default/sitemapxml/tpl_main_page.php(21): require('/home/zch1akhw6...')
#4 /index.php(95): require('/home/zch1akhw6...')
--> PHP Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /includes/classes/sitemapxml.php on line 225.
>
> It is a partial log as it is much longer but repeat itself.
>
> If there is an easy way to fix it, it would be great
>
> Thank you
Thanks for the report. You can correct that issue by editing /includes/modules/pages/sitemapxml/sitemapxml_prodcts_reviews.php (line 37) adding the highlighted bit below.
[I][B]Note[/B][/I]: GitHub issue created for tracking ... https://github.com/lat9/sitemapxml/issues/49
$sitemapXML->SitemapSetMaxItems($reviews->RecordCount());
foreach ($reviews as $next_review) {
$sitemapXML->writeItem(FILENAME_PRODUCT_REVIEWS, 'products_id=' . $next_review['products_id'], $next_review['languages_id'], $next_review['last_date'][B] ?? $last_date[/B], SITEMAPXML_PRODUCTS_REVIEWS_CHANGEFREQ);
}
Note: GitHub issue opened for tracking ... <https://github.com/lat9/sitemapxml/issues/49>