From bec9f67bc1266e1443317bc3a4aafcfae1688021 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 3 Dec 2020 23:07:33 +0100 Subject: [PATCH] bump php version --- PhpOffice/PhpSpreadsheet/Reader/Security/XmlScanner.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PhpOffice/PhpSpreadsheet/Reader/Security/XmlScanner.php b/PhpOffice/PhpSpreadsheet/Reader/Security/XmlScanner.php index 732f0bf..4798004 100644 --- a/PhpOffice/PhpSpreadsheet/Reader/Security/XmlScanner.php +++ b/PhpOffice/PhpSpreadsheet/Reader/Security/XmlScanner.php @@ -63,7 +63,7 @@ class XmlScanner private function disableEntityLoaderCheck() { - if (Settings::getLibXmlDisableEntityLoader()) { + if (Settings::getLibXmlDisableEntityLoader() && \PHP_VERSION_ID < 80000) { $libxmlDisableEntityLoaderValue = libxml_disable_entity_loader(true); if (self::$libxmlDisableEntityLoaderValue === null) { @@ -74,7 +74,7 @@ class XmlScanner public static function shutdown() { - if (self::$libxmlDisableEntityLoaderValue !== null) { + if (self::$libxmlDisableEntityLoaderValue !== null && \PHP_VERSION_ID < 80000) { libxml_disable_entity_loader(self::$libxmlDisableEntityLoaderValue); self::$libxmlDisableEntityLoaderValue = null; }