diff --git a/src/SocialFeed/SocialFeedNewsClass.php b/src/SocialFeed/SocialFeedNewsClass.php index 39c7d13..2487b16 100644 --- a/src/SocialFeed/SocialFeedNewsClass.php +++ b/src/SocialFeed/SocialFeedNewsClass.php @@ -23,6 +23,7 @@ use Contao\FilesModel; use Contao\StringUtil; use Contao\System; +use Imagine\Exception\RuntimeException; use Pdir\SocialFeedBundle\Model\SocialFeedModel; class SocialFeedNewsClass @@ -66,7 +67,11 @@ public function parseNews($objTemplate, $arrRow, $objModule): void } if (null !== $imagePath) { - $pictureObj = $pictureFactory->create($this->projectDir.DIRECTORY_SEPARATOR.$imagePath); + try { + $pictureObj = $pictureFactory->create($this->projectDir.DIRECTORY_SEPARATOR.$imagePath); + } catch (RuntimeException) { + $pictureObj = null; + } if (null !== $pictureObj) { $objTemplate->accountPicture = $this->getTemplateData($pictureObj);