From c172969e527e274ea1f93a56c0ffa46c3f236898 Mon Sep 17 00:00:00 2001 From: sksaju Date: Tue, 13 Feb 2024 02:33:39 +0600 Subject: [PATCH] fix width and height metadata condtion on svg_dimensions function --- safe-svg.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/safe-svg.php b/safe-svg.php index af205634..bf7b1c4f 100644 --- a/safe-svg.php +++ b/safe-svg.php @@ -591,7 +591,7 @@ protected function svg_dimensions( $attachment_id ) { $width = 0; $height = 0; - if ( $svg && ! empty( $metadata['width'] ) && empty( $metadata['height'] ) ) { + if ( $svg && ! empty( $metadata['width'] ) && ! empty( $metadata['height'] ) ) { $width = floatval( $metadata['width'] ); $height = floatval( $metadata['height'] ); } elseif ( $svg ) {