Skip to content

Commit

Permalink
Merge branch 'develop' into fix/182
Browse files Browse the repository at this point in the history
  • Loading branch information
dkotter authored Mar 26, 2024
2 parents 1f41391 + 941da6c commit f887c1c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions safe-svg.php
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,11 @@ protected function svg_dimensions( $attachment_id ) {
} elseif ( $svg ) {
$svg = @simplexml_load_file( $svg ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged

// Ensure the svg could be loaded.
if ( ! $svg ) {
return false;
}

$attributes = $svg->attributes();

if ( isset( $attributes->viewBox ) ) { // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
Expand Down

0 comments on commit f887c1c

Please sign in to comment.