From 07a4de528d0d9a73135209c610570963197d1c3f Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Mon, 22 May 2023 13:21:14 +0000 Subject: [PATCH] wait #5936 @0.5 --- inc/ws/Util/html5/master/class.ws.html5.compiler.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/inc/ws/Util/html5/master/class.ws.html5.compiler.php b/inc/ws/Util/html5/master/class.ws.html5.compiler.php index ed95ca391..339a34b1c 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -3510,6 +3510,10 @@ height="0" width="0" style="display:none;visibility:hidden"> return $fixed; } $svg = simplexml_load_string(file_get_contents($source)); + if (!$svg) { + copy($source, $fixed); + return $fixed; + } $attr = $svg->attributes(); if (isset($attr['width'], $attr['height'])) { copy($source, $fixed); @@ -3522,6 +3526,7 @@ height="0" width="0" style="display:none;visibility:hidden"> $svg->addAttribute('height', $dim[1]); file_put_contents($fixed, $svg->asXML()); + return $fixed; } -- 2.39.5