Commit 6542cb24 authored by darrell_ulm's avatar darrell_ulm Committed by pifagor

Issue #2986847 by darrell_ulm, klausi, pifagor, cilefen, hockey2112,...

Issue #2986847 by darrell_ulm, klausi, pifagor, cilefen, hockey2112, drupal-son, joshua.boltz, virtualbrian, jerry, milodesc, shi99, pfrenssen, saurabh-chugh, Vj, japo32, voleger, alex_optim, efruin: TypeError: Argument 1 passed to xmlsitemap_node_create_link() must be an instance of stdClass, boolean given
parent b2384df5
......@@ -278,11 +278,13 @@ function xmlsitemap_menu_create_link(array $menu_item) {
// Exclude menu items created for nodes that are added by xmlsitemap_node.
if ($menu_item['xmlsitemap']['access'] && $menu_item['router_path'] == 'node/%' && module_exists('xmlsitemap_node')) {
$node = node_load(substr($menu_item['link_path'], 5));
if (empty($node->xmlsitemap)) {
xmlsitemap_node_create_link($node);
}
if ($node->xmlsitemap['status'] && $node->xmlsitemap['access']) {
$menu_item['xmlsitemap']['status'] = FALSE;
if ($node) {
if (empty($node->xmlsitemap)) {
xmlsitemap_node_create_link($node);
}
if ($node->xmlsitemap['status'] && $node->xmlsitemap['access']) {
$menu_item['xmlsitemap']['status'] = FALSE;
}
}
}
......
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