lat9 / sitemapxml

This Script generates an Sitemap as described sitemaps.org
Other
2 stars 2 forks source link

Correct file-related PHP Warnings when an output `.xml` file doesn't already exist #40

Closed lat9 closed 7 months ago

lat9 commented 7 months ago

Seeing logs like the following on the first 'run' of the tool (or if additional products are added so that additional number-suffixed files are to be created):

[30-Mar-2024 09:25:09 America/New_York] Request URI: /zc200w/admin200/index.php?cmd=sitemapxml, IP address: 127.0.0.1, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 C:\xampp\htdocs\zc200w\admin200\sitemapxml.php(256): filesize()
#2 C:\xampp\htdocs\zc200w\admin200\index.php(11): require('C:\\xampp\\htdocs...')
--> PHP Warning: filesize(): stat failed for /sitemap.xml in C:\xampp\htdocs\zc200w\admin200\sitemapxml.php on line 256.

[30-Mar-2024 09:25:09 America/New_York] Request URI: /zc200w/admin200/index.php?cmd=sitemapxml, IP address: 127.0.0.1, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 C:\xampp\htdocs\zc200w\admin200\sitemapxml.php(257): filemtime()
#2 C:\xampp\htdocs\zc200w\admin200\index.php(11): require('C:\\xampp\\htdocs...')
--> PHP Warning: filemtime(): stat failed for /sitemap.xml in C:\xampp\htdocs\zc200w\admin200\sitemapxml.php on line 257.

[30-Mar-2024 09:25:09 America/New_York] Request URI: /zc200w/admin200/index.php?cmd=sitemapxml, IP address: 127.0.0.1, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 C:\xampp\htdocs\zc200w\admin200\sitemapxml.php(258): fileperms()
#2 C:\xampp\htdocs\zc200w\admin200\index.php(11): require('C:\\xampp\\htdocs...')
--> PHP Warning: fileperms(): stat failed for /sitemap.xml in C:\xampp\htdocs\zc200w\admin200\sitemapxml.php on line 258.