From 9e25104b0e2d1964421d4874c1f61e033d9d5fb3 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Thu, 20 Jun 2019 20:26:08 +0200 Subject: [PATCH] [9.1.13] erreur sitemap blog sans article ! --- core/core.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/core.php b/core/core.php index 811d8015..e8940e27 100644 --- a/core/core.php +++ b/core/core.php @@ -680,7 +680,8 @@ class common { $sitemap->addUrl($childKey,$datetime); // La sous-page est un blog - if ($this->getData(['page', $childKey, 'moduleId']) === 'blog') { + if ($this->getData(['page', $childKey, 'moduleId']) === 'blog' && + !empty($this->getData(['module',$childKey])) ) { foreach($this->getData(['module',$childKey]) as $articleId => $article) { if($this->getData(['module',$childKey,$articleId,'state']) === true) { $date = $this->getData(['module',$childKey,$articleId,'publishedOn']); @@ -690,7 +691,8 @@ class common { } } // Articles du blog - if ($this->getData(['page', $parentPageId, 'moduleId']) === 'blog') { + if ($this->getData(['page', $parentPageId, 'moduleId']) === 'blog' && + !empty($this->getData(['module',$parentPageId])) ) { foreach($this->getData(['module',$parentPageId]) as $articleId => $article) { if($this->getData(['module',$parentPageId,$articleId,'state']) === true) { $date = $this->getData(['module',$parentPageId,$articleId,'publishedOn']);