[FIX] Fix error in case image file is missing

This commit is contained in:
Tony Air 2022-10-09 19:56:20 +02:00
parent 197aeb3537
commit 8ef5d1af25
1 changed files with 2 additions and 1 deletions

View File

@ -71,7 +71,8 @@ class SlideImageEx extends DataExtension
return $img->Link();
}
return $img->FocusFill($this->getSlideWidth(), $this->getSlideHeight())->Link();
$thumb = $img->FocusFill($this->getSlideWidth(), $this->getSlideHeight());
return $thumb ? $thumb->Link() : null;
}
public function getSlideWidth()