Fix issue displaying protected file thumbnails when width or height is empty.
Related #5267
This commit is contained in:
parent
1ef50d4751
commit
ce47c0248f
|
|
@ -26,6 +26,9 @@ class File extends FileBase
|
|||
public function getThumb($width, $height, $options = [])
|
||||
{
|
||||
$url = '';
|
||||
$width = !empty($width) ? $width : 0;
|
||||
$height = !empty($height) ? $height : 0;
|
||||
|
||||
if (!$this->isPublic() && class_exists(Files::class)) {
|
||||
$options = $this->getDefaultThumbOptions($options);
|
||||
// Ensure that the thumb exists first
|
||||
|
|
|
|||
Loading…
Reference in New Issue