summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorwn <[email protected]>2020-12-12 09:53:08 -0600
committerwn <[email protected]>2020-12-12 10:28:49 -0600
commit936b91a7e656169c7cc2f4652ee4ab9114d11dbc (patch)
tree7ee0523a28e16b1579594b906792594ad5ad5000 /include
parent6bdf4a1a25f1fc2e84fdc65e3e6a74578536f137 (diff)
Don't do deprecated 'libxml_disable_entity_loader(true)' under PHP 8.
https://github.com/php/php-src/blob/2d467abc46ec4ee97484d4e35909bed322600037/UPGRADING#L886
Diffstat (limited to 'include')
-rw-r--r--include/functions.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/functions.php b/include/functions.php
index 2f4ee8e35..a70b4ac44 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -18,7 +18,10 @@
$fetch_effective_url = false;
$fetch_curl_used = false;
- libxml_disable_entity_loader(true);
+ if (version_compare(PHP_VERSION, '8.0.0', '<')) {
+ libxml_disable_entity_loader(true);
+ }
+
libxml_use_internal_errors(true);
// separate test because this is included before sanity checks