Commit 99dc2e6a authored by klausi's avatar klausi Committed by pifagor

Issue #2986847 by klausi, Vj, pfrenssen, shi99, milodesc, saurabh-chugh,...

Issue #2986847 by klausi, Vj, pfrenssen, shi99, milodesc, saurabh-chugh, jerry, efruin, pifagor, drupal-son, virtualbrian, hockey2112: TypeError: Argument 1 passed to xmlsitemap_node_create_link() must be an instance of stdClass, boolean given
parent 11b7c8ac
......@@ -30,8 +30,12 @@ function xmlsitemap_node_cron() {
$limit--;
try {
$node = node_load($item->data);
$link = xmlsitemap_node_create_link($node);
xmlsitemap_link_save($link, array($link['type'] => $node));
// The node could have been deleted in the meantime, skip XML sitemap
// updates in this case.
if ($node) {
$link = xmlsitemap_node_create_link($node);
xmlsitemap_link_save($link, array($link['type'] => $node));
}
$queue->deleteItem($item);
}
catch (Exception $e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment