mirror of
https://github.com/a2nt/silverstripe-elemental-basics.git
synced 2024-10-22 15:05:54 +00:00
[FIX] Fix error in case image file is missing
This commit is contained in:
parent
197aeb3537
commit
8ef5d1af25
@ -71,7 +71,8 @@ class SlideImageEx extends DataExtension
|
|||||||
return $img->Link();
|
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()
|
public function getSlideWidth()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user