Warning in class-googlesitemapgeneratorstandardbuilder.php
-
I run several not-for-profit sites that use your sitemap generator plugin. Until recently it has worked very well for us – and better than the WP intrinsic generator.
However we are seeing the following warning in all our sites (currently using version 4.1.5):
[18-Jul-2022 04:52:31 UTC] PHP Warning: A non-numeric value encountered in /homepages/9/d499301548/htdocs/clickandbuilds/WordPress/MyBlog/wp-content/plugins/google-sitemap-generator/class-googlesitemapgeneratorstandardbuilder.php on line 493
At the failing line $offset and $taxonomy are both “category”. With that passed as a parameter to build_taxonomies, the warning is inevitable. It looks like there should be an ‘else’ condition in the opening ‘if’ statement.
The problem started, from memory, a couple of months ago.
We are running WordPress 6.0.1 but we also saw the problem under 5.9.
The problem doesn’t occur on every sitemap.xml request, however. Perhaps due to caching?
In our settings we have ‘include categories’ ticked and one category excluded.
Let me know if I can provide more information.
- The topic ‘Warning in class-googlesitemapgeneratorstandardbuilder.php’ is closed to new replies.