Commit 2f0fefd8 authored by bucefal91's avatar bucefal91 Committed by renatog
Browse files

Issue #1788284 by bucefal91, stBorchert, -sibero-, diego21, lmeurs, RenatoG:...

Issue #1788284 by bucefal91, stBorchert, -sibero-, diego21, lmeurs, RenatoG: XML Sitemap Menu gets stuck in a loop, in very specific case
parent c23b9c7d
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -99,6 +99,15 @@ function xmlsitemap_menu_xmlsitemap_index_links($limit) {
 *   An array of menu link IDs.
 */
function xmlsitemap_menu_xmlsitemap_process_menu_links(array $mlids, array $xmlsitemap = array()) {
  // Blunt anti-recursion fuse.
  // See https://www.drupal.org/project/xmlsitemap/issues/1788284 for details.
  static $recursion = FALSE;

  if ($recursion) {
    return;
  }
  $recursion = TRUE;

  // Set the global user variable to the anonymous user.
  xmlsitemap_switch_user(0);