1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 06:42:42 +01:00

Suppress PHP 8 deprecation warning in startup

Summary: Ref T13588. See D21497. As of PHP 8, the XML entity loader is disabled by default and the `libxml_disable_entity_loader` function is deprecated. Thus suppress the deprecation warning for now; we could skip the function call, but this is safer.

Test Plan:
* Still works with PHP 7.
* No more deprecation message with PHP 8.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T13588

Differential Revision: https://secure.phabricator.com/D21701
This commit is contained in:
Dmitri Iouchtchenko 2021-06-06 14:01:53 -04:00
parent a0b91de535
commit 2f1acf8b10

View file

@ -392,8 +392,11 @@ final class PhabricatorStartup {
ini_set('memory_limit', -1); ini_set('memory_limit', -1);
// If we have libxml, disable the incredibly dangerous entity loader. // If we have libxml, disable the incredibly dangerous entity loader.
// PHP 8 deprecates this function and disables this by default; remove once
// PHP 7 is no longer supported or a future version has removed the function
// entirely.
if (function_exists('libxml_disable_entity_loader')) { if (function_exists('libxml_disable_entity_loader')) {
libxml_disable_entity_loader(true); @libxml_disable_entity_loader(true);
} }
// See T13060. If the locale for this process (the parent process) is not // See T13060. If the locale for this process (the parent process) is not