diff --git a/modules/system/models/File.php b/modules/system/models/File.php index a373cb363..980da0312 100644 --- a/modules/system/models/File.php +++ b/modules/system/models/File.php @@ -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