diff --git a/safe-svg.php b/safe-svg.php index f5a30c7c..aec97cd9 100644 --- a/safe-svg.php +++ b/safe-svg.php @@ -560,7 +560,7 @@ public function metadata_error_fix( $data, $post_id ) { /** * Get SVG size from the width/height or viewport. * - * @param string|false $svg The file path to where the SVG file should be, false otherwise. + * @param integer $attachment_id The attachment ID of the SVG being processed. * * @return array|bool */ @@ -594,7 +594,7 @@ protected function svg_dimensions( $attachment_id ) { if ( $svg && ! empty( $metadata['width'] ) && empty( $metadata['height'] ) ) { $width = floatval( $metadata['width'] ); $height = floatval( $metadata['height'] ); - } else if ( $svg ) { + } elseif ( $svg ) { $svg = @simplexml_load_file( $svg ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged $attributes = $svg->attributes();