Skip to content

Commit 2f1acf8

Browse files
committed
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
1 parent a0b91de commit 2f1acf8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

support/startup/PhabricatorStartup.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,11 @@ private static function setupPHP() {
392392
ini_set('memory_limit', -1);
393393

394394
// If we have libxml, disable the incredibly dangerous entity loader.
395+
// PHP 8 deprecates this function and disables this by default; remove once
396+
// PHP 7 is no longer supported or a future version has removed the function
397+
// entirely.
395398
if (function_exists('libxml_disable_entity_loader')) {
396-
libxml_disable_entity_loader(true);
399+
@libxml_disable_entity_loader(true);
397400
}
398401

399402
// See T13060. If the locale for this process (the parent process) is not

0 commit comments

Comments
 (0)