Hello.
Sorry for the delay.
Please could you check if this is still happening in version 2.0.1?
Thanks
Yes I am using version 2.01. About 1000-1500 such error entries are generated per day. Automatic updating is turned on.
The wp version number is 5.7
cmm
(@cmoschella)
I am seeing this error in my logs as well…WP version 5.7 and plugin version 2.0.1
PHP Warning: Invalid argument supplied for foreach() in /var/www/wordpress/wp-content/plugins/www-xml-sitemap-generator-org/code/renderers/xmlRenderer.php on line 94
-
This reply was modified 4 years ago by
cmm.
cmm
Thank you for confirming this error. This already proves that this is not a unique error. Now it would only be good if the repair was done.
Hello,
i am using the plugin too.
I also confirm on my site I get many identical errors in my error_log_php.
Hi, I’ve just installed the plugin and am getting the same error. You can see it in the XML here.
Hello,
you can hotfix the file wp-content/plugins/www-xml-sitemap-generator-org/code/renderers/xmlRenderer.php line 94 – function renderImages just add isset condition
View post on imgur.com
private function renderImages($images)
{
if (isset($images)) {
foreach( $images as $image )
{
echo '<image:image>' ;
echo '<image:loc>' . $image->location . '</image:loc>';
if (!empty($image->caption)) {echo '<image:caption>' . $image->caption . '</image:caption>';}
if (!empty($image->title)) { echo '<image:title>' . $image->title . '</image:title>';}
echo "</image:image>\n" ;
}
}
}