HHVM: Call libxml_use_internal_errors() instead of surpressing errors.

In contrast to the previous solution, this also works on HHVM.
This commit is contained in:
Andreas Fischer 2014-12-17 17:00:10 +01:00
parent 532ba99f1c
commit 8c509c3437
1 changed files with 2 additions and 1 deletions

View File

@ -41,8 +41,9 @@ class InfoParser {
return null;
}
libxml_use_internal_errors(true);
$loadEntities = libxml_disable_entity_loader(false);
$xml = @simplexml_load_file($file);
$xml = simplexml_load_file($file);
libxml_disable_entity_loader($loadEntities);
if ($xml == false) {
return null;