summaryrefslogtreecommitdiff
path: root/include/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/functions.php')
-rw-r--r--include/functions.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/functions.php b/include/functions.php
index ceb7fbd9e..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
@@ -327,7 +330,7 @@
function sanity_check() {
require_once 'errors.php';
- global $ERRORS;
+ $ERRORS = get_error_types();
$error_code = 0;
$schema_version = get_schema_version(true);
@@ -540,7 +543,7 @@
*/
function error_json($code) {
require_once "errors.php";
- global $ERRORS;
+ $ERRORS = get_error_types();
@$message = $ERRORS[$code];