Page MenuHomePhabricator

Wrap get_magic_quotes_gpc check in PhabricatorStartup.php (removed in PHP 8.0)
Closed, InvalidPublic

Description

get_magic_quotes_gpc got removed in PHP 8. If we ever upgraded it would require a code change, as I get Uncaught Error: Call to undefined function get_magic_quotes_gpc() in /var/www/html/phabwmf/phabricator/support/startup/PhabricatorStartup.php:526. I assume that would be something like

+    if (PHP_VERSION_ID < 80000) {
       if (get_magic_quotes_gpc()) {
         self::didFatal(
           "Your server is configured with PHP 'magic_quotes_gpc' enabled. This ".
           "feature is 'highly discouraged' by PHP's developers and you must ".
           "disable it to run Phabricator. Consult the PHP manual for ".
           "instructions.");
       }
+    }

Event Timeline

Eh, thanks! I guess I'll need to spend time to locally switch to the we.phorge.it version, as I'm running into more PHP8 issues in libphutil (which seems to be gone)