summaryrefslogtreecommitdiff
path: root/include/functions.php
diff options
context:
space:
mode:
authorfox <[email protected]>2020-12-16 11:06:48 +0000
committerGogs <[email protected]>2020-12-16 11:06:48 +0000
commitef7e67936350fce7b29499d6917d2a577105c779 (patch)
tree2f0ea59f0fc41d2ffed49c78214de69ae6b54d76 /include/functions.php
parentb4b2ba99effc4c6f8465e907bf95b6c2f6452fdb (diff)
parent62da307ef147b32eb214edecf1541f8ce896a700 (diff)
Merge branch 'feature/php8' of wn/tt-rss into master
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];