diff --git a/CHANGES.md b/CHANGES.md index d95a50e6..48112843 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,9 @@ # Changelog ## Version 9.1.12 +- Correction : + - OpenGraph : pb lors de la suppression de l'imagette + - Amélioration : - Contrôle d'erreur dans la gestion de l'imagette OpenGraph - Correction: diff --git a/core/core.php b/core/core.php index 4b39e73c..7951a614 100644 --- a/core/core.php +++ b/core/core.php @@ -681,7 +681,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']); @@ -691,7 +692,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']); diff --git a/core/module/config/config.php b/core/module/config/config.php index 63d392d8..3dc5e1f5 100755 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -240,7 +240,9 @@ class config extends common { $data = 'data:image/jpeg;base64,'.$screenshot; $data = base64_decode(preg_replace('#^data:image/\w+;base64,#i', '', $data)); // Effacer la miniature - unlink (self::FILE_DIR.'thumb/screenshot.png'); + if (file_exists(self::FILE_DIR.'thumb/screenshot.png')) { + unlink (self::FILE_DIR.'thumb/screenshot.png'); + } file_put_contents( self::FILE_DIR.'source/screenshot.png',$data); $success =true; }