mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-11-29 08:56:03 +00:00
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:
1 parent
e4f48ddc1a
commit
9d520ab56d
2 files changed
+18
-2
No files matched your search
+14
-2
@@ -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() {
|
||||
|
||||
Reference in new issue
Block a user