1.9.9 doesn’t return correct width and height
-
After upgrading Safe SVG from 1.9.8 to 1.9.9, almost all svg images are shown as width=100 and height=100 regardless actual image size.
I investigated the changelogs, and found added code:
is_numeric( $attributes->width ) && is_numeric( $attributes->height )
$attributes->width
and$attributes->height
are object(SimpleXMLElement), not string, thereforeis_numeric( $attributes->width )
andis_numeric( $attributes->height )
always return false. So default image size (width=100 and height=100) are applied.To modify this problem, the code is to be:
is_numeric( (string)$attributes->width ) && is_numeric( (string)$attributes->height )
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘1.9.9 doesn’t return correct width and height’ is closed to new replies.