1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-08 07:47:00 +02:00

Fix issue processwire/processwire-issues#1925 using something like PR #288 via @daun

Co-authored-by: daun <post@philippdaun.net>
This commit is contained in:
Ryan Cramer
2024-08-09 14:29:13 -04:00
parent 1fdc61dc41
commit ce01e699e3

View File

@@ -543,8 +543,8 @@ class Pageimage extends Pagefile {
if(!$filename) $filename = $this->filename;
$xml = @file_get_contents($filename);
if($xml) {
$a = @simplexml_load_string($xml)->attributes();
if($xml && false !== ($a = @simplexml_load_string($xml))) {
$a = $a->attributes();
if((int) $a->width > 0) $width = (int) $a->width;
if((int) $a->height > 0) $height = (int) $a->height;
if((!$width || !$height) && $a->viewBox) {