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:
@@ -543,8 +543,8 @@ class Pageimage extends Pagefile {
|
|||||||
if(!$filename) $filename = $this->filename;
|
if(!$filename) $filename = $this->filename;
|
||||||
$xml = @file_get_contents($filename);
|
$xml = @file_get_contents($filename);
|
||||||
|
|
||||||
if($xml) {
|
if($xml && false !== ($a = @simplexml_load_string($xml))) {
|
||||||
$a = @simplexml_load_string($xml)->attributes();
|
$a = $a->attributes();
|
||||||
if((int) $a->width > 0) $width = (int) $a->width;
|
if((int) $a->width > 0) $width = (int) $a->width;
|
||||||
if((int) $a->height > 0) $height = (int) $a->height;
|
if((int) $a->height > 0) $height = (int) $a->height;
|
||||||
if((!$width || !$height) && $a->viewBox) {
|
if((!$width || !$height) && $a->viewBox) {
|
||||||
|
Reference in New Issue
Block a user