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

Suppress PHP 8 deprecation warning in __arcanist_init_script__

Summary:
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: Used to create this revision with PHP 8 on macOS

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D21497
This commit is contained in:
Jessica Clarke 2021-01-10 22:21:29 +00:00 committed by jrtc27
parent 3ab2b407db
commit 930f7e117d

View file

@ -94,8 +94,11 @@ function __arcanist_init_script__() {
))); )));
// Disable the insanely dangerous XML entity loader by default. // Disable the insanely dangerous XML entity loader by default.
// 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);
} }
$root = dirname(dirname(dirname(__FILE__))); $root = dirname(dirname(dirname(__FILE__)));