- Issue created by @klausi
- Merge request !61fix(generate): Fix type error when rebuild query has no results β (Open) created by klausi
When running drush xmlsitemap-rebuild
on a large site I get this error:
Undefined array key "node" xmlsitemap.generate.inc:500
WD php: TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in array_keys() (line 500 of /var/www/site/docroot/profiles/recruiter/modules/xmlsitemap/xmlsitemap.generate.inc).#0
/var/www/site/docroot/profiles/recruiter/modules/xmlsitemap/xmlsitemap.generate.inc(500): array_keys(NULL)
#1 /var/www/site/docroot/includes/batch.inc(243): xmlsitemap_rebuild_batch_fetch('node', Array)
This probably happens because the count of nodes changed while the sitemap rebuild is running. Then there are no further nodes to process and we should stop.
Run drush xmlsitemap-rebuild
on a large site while nodes get deleted.
Check for empty results.
Merge request
none
none
none
Active
2.0
xmlsitemap.module