@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+12 -6
+12 -6
support/startup/PhabricatorStartup.php
··· 521 521 "'{$required_version}'."); 522 522 } 523 523 524 - if (@get_magic_quotes_gpc()) { 525 - self::didFatal( 526 - "Your server is configured with PHP 'magic_quotes_gpc' enabled. This ". 527 - "feature is 'highly discouraged' by PHP's developers and you must ". 528 - "disable it to run Phabricator. Consult the PHP manual for ". 529 - "instructions."); 524 + if (function_exists('get_magic_quotes_gpc')) { 525 + if (@get_magic_quotes_gpc()) { 526 + self::didFatal( 527 + 'Your server is configured with the PHP language feature '. 528 + '"magic_quotes_gpc" enabled.'. 529 + "\n\n". 530 + 'This feature is "highly discouraged" by PHP\'s developers, and '. 531 + 'has been removed entirely in PHP8.'. 532 + "\n\n". 533 + 'You must disable "magic_quotes_gpc" to run Phabricator. Consult '. 534 + 'the PHP manual for instructions.'); 535 + } 530 536 } 531 537 532 538 if (extension_loaded('apc')) {