diff --git a/Sources/Graphics/Image.php b/Sources/Graphics/Image.php index 680c4967d4..af038de388 100644 --- a/Sources/Graphics/Image.php +++ b/Sources/Graphics/Image.php @@ -959,16 +959,16 @@ protected function getSvgDimensions(): void $vb_height = $matches[3]; // No dimensions given, so use viewBox dimensions. - if (!empty($width) && !empty($height)) { + if (!isset($width) && !isset($height)) { $width = $vb_width; $height = $vb_height; } // Width but no height, so calculate height. - elseif (!empty($width)) { + elseif (isset($width)) { $height = $width * $vb_height / $vb_width; } // Height but no width, so calculate width. - elseif (!empty($height)) { + elseif (isset($height)) { $width = $height * $vb_width / $vb_height; } }