From bcecdab03b34447f40b34e96cde639ee0efaae0f Mon Sep 17 00:00:00 2001 From: Jon Stovell Date: Thu, 24 Oct 2024 21:45:04 -0600 Subject: [PATCH] Fixes bug determining SVG dimensions in SMF\Graphics\Image Signed-off-by: Jon Stovell --- Sources/Graphics/Image.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; } }