Don't check for magic quotes on PHP 8 or newer - functions removed.

This fix removes complaints about trying to call non-existant functions
as they have been removed from PHP 8. This closes #234.
This commit is contained in:
Andrew Ruthven 2021-09-18 21:50:07 +12:00
parent e4f48ddc1a
commit 9d520ab56d
2 changed files with 18 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2021-09-18 Andrew Ruthven <puck@catalystcloud.nz>
* Don't try and use get_magic_quotes_gpc or get_magic_quotes_runtime on PHP 8
or newer.
2021-03-01 Florian Schlichting <fsfs@debian.org>
* release davical 1.1.10
* Update carddav/2042-REPORT-addressbook-query together with df6ff3a in AWL

View File

@ -151,11 +151,23 @@ function check_suhosin_server_strip() {
}
function check_magic_quotes_gpc() {
return new CheckResult( (get_magic_quotes_gpc() == 0) );
# get_magic_quotes_gpc has been removed as of PHP 8, so our check that it
# is disabled should ways pass from PHP 8 onwards.
if (version_compare(phpversion(), '8.0.0', '>=')) {
return new CheckResult(true);
} else {
return new CheckResult( (get_magic_quotes_gpc() == 0) );
}
}
function check_magic_quotes_runtime() {
return new CheckResult( (get_magic_quotes_runtime() == 0) );
# get_magic_quotes_runtime has been removed as of PHP 8, so our check that it
# is disabled should ways pass from PHP 8 onwards.
if (version_compare(phpversion(), '8.0.0', '>=')) {
return new CheckResult(true);
} else {
return new CheckResult( (get_magic_quotes_runtime() == 0) );
}
}
function check_curl() {