diff --git a/Classes/Utility/SvgUtility.php b/Classes/Utility/SvgUtility.php index 92fb142f4..5bf8b7898 100644 --- a/Classes/Utility/SvgUtility.php +++ b/Classes/Utility/SvgUtility.php @@ -55,14 +55,7 @@ public static function getInlineSvg( } // Disables the functionality to allow external entities to be loaded when parsing the XML, must be kept - $previousValueOfEntityLoader = false; - if (PHP_MAJOR_VERSION < 8) { - $previousValueOfEntityLoader = libxml_disable_entity_loader(true); - } $svgElement = simplexml_load_string($svgContent); - if (PHP_MAJOR_VERSION < 8) { - libxml_disable_entity_loader($previousValueOfEntityLoader); - } if (!$svgElement instanceof \SimpleXMLElement) { return ''; } @@ -78,8 +71,7 @@ public static function getInlineSvg( // remove xml version tag $domXml = dom_import_simplexml($svgElement); - /** @phpstan-ignore-next-line */ - if (!$domXml instanceof \DOMElement || !$domXml->ownerDocument instanceof \DOMDocument) { + if (!$domXml->ownerDocument instanceof \DOMDocument) { return ''; }