aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/xml/lib
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/xml/lib')
-rw-r--r--vendor/sabre/xml/lib/Reader.php10
-rw-r--r--vendor/sabre/xml/lib/Version.php2
2 files changed, 9 insertions, 3 deletions
diff --git a/vendor/sabre/xml/lib/Reader.php b/vendor/sabre/xml/lib/Reader.php
index a28cf8c3b..368e8ffd2 100644
--- a/vendor/sabre/xml/lib/Reader.php
+++ b/vendor/sabre/xml/lib/Reader.php
@@ -55,7 +55,11 @@ class Reader extends XMLReader
*/
public function parse(): array
{
- $previousEntityState = libxml_disable_entity_loader(true);
+ $previousEntityState = null;
+ $shouldCallLibxmlDisableEntityLoader = (\PHP_VERSION_ID < 80000);
+ if ($shouldCallLibxmlDisableEntityLoader) {
+ $previousEntityState = libxml_disable_entity_loader(true);
+ }
$previousSetting = libxml_use_internal_errors(true);
try {
@@ -78,7 +82,9 @@ class Reader extends XMLReader
}
} finally {
libxml_use_internal_errors($previousSetting);
- libxml_disable_entity_loader($previousEntityState);
+ if ($shouldCallLibxmlDisableEntityLoader) {
+ libxml_disable_entity_loader($previousEntityState);
+ }
}
return $result;
diff --git a/vendor/sabre/xml/lib/Version.php b/vendor/sabre/xml/lib/Version.php
index 56c5c5285..d4e465de9 100644
--- a/vendor/sabre/xml/lib/Version.php
+++ b/vendor/sabre/xml/lib/Version.php
@@ -16,5 +16,5 @@ class Version
/**
* Full version number.
*/
- const VERSION = '2.2.1';
+ const VERSION = '2.2.3';
}