Skip to content

Commit

Permalink
fix width and height metadata condtion on svg_dimensions function
Browse files Browse the repository at this point in the history
  • Loading branch information
sksaju committed Feb 12, 2024
1 parent 7bdc8bc commit c172969
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion safe-svg.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down

0 comments on commit c172969

Please sign in to comment.