mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 06:42:42 +01:00
Test if "get_magic_quotes_gpc()" exists before calling it
Summary: Ref T13588. This function was deprecated in PHP 7.4 (see D20942) and removed in PHP8. Test that it exists before calling it so we don't fatal in PHP8. See <https://discourse.phabricator-community.org/t/daemon-fails-on-php-8-0-2-in-utils-php-array-merge-call-w-fix/4568>. Test Plan: Used "|| true" to test the message in PHP7. No actual testing in PHP8, but a user reports a similar patch works. Maniphest Tasks: T13588 Differential Revision: https://secure.phabricator.com/D21549
This commit is contained in:
parent
00cf93548b
commit
67cf80b377
1 changed files with 12 additions and 6 deletions
|
@ -521,12 +521,18 @@ final class PhabricatorStartup {
|
||||||
"'{$required_version}'.");
|
"'{$required_version}'.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (@get_magic_quotes_gpc()) {
|
if (function_exists('get_magic_quotes_gpc')) {
|
||||||
self::didFatal(
|
if (@get_magic_quotes_gpc()) {
|
||||||
"Your server is configured with PHP 'magic_quotes_gpc' enabled. This ".
|
self::didFatal(
|
||||||
"feature is 'highly discouraged' by PHP's developers and you must ".
|
'Your server is configured with the PHP language feature '.
|
||||||
"disable it to run Phabricator. Consult the PHP manual for ".
|
'"magic_quotes_gpc" enabled.'.
|
||||||
"instructions.");
|
"\n\n".
|
||||||
|
'This feature is "highly discouraged" by PHP\'s developers, and '.
|
||||||
|
'has been removed entirely in PHP8.'.
|
||||||
|
"\n\n".
|
||||||
|
'You must disable "magic_quotes_gpc" to run Phabricator. Consult '.
|
||||||
|
'the PHP manual for instructions.');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (extension_loaded('apc')) {
|
if (extension_loaded('apc')) {
|
||||||
|
|
Loading…
Reference in a new issue