diff --git a/src/Controller/ImageController.php b/src/Controller/ImageController.php index 869d58502..5ef606bfe 100644 --- a/src/Controller/ImageController.php +++ b/src/Controller/ImageController.php @@ -143,8 +143,8 @@ private function parseParameters(string $paramString): void $raw = explode('×', preg_replace('/([0-9])(x)([0-9a-z])/i', '\1×\3', $paramString)); $this->parameters = [ - 'w' => is_numeric($raw[0]) ? (int) $raw[0] : 400, - 'h' => is_numeric($raw[1]) ? (int) $raw[1] : 300, + 'w' => (isset($raw[0] && is_numeric($raw[0])) ? (int) $raw[0] : 400, + 'h' => (isset($raw[1]) && is_numeric($raw[1])) ? (int) $raw[1] : 300, 'fit' => isset($raw[2]) ? $raw[2] : $this->config->get('general/thumbnails/default_cropping', 'default'), 'location' => 'files', 'q' => (!empty($raw[2]) && 0 <= $raw[2] && $raw[2] <= 100) ? (int) $raw[2] : 80