[Translation] fixed usage of LIBXML_COMPACT as it is not always available

This commit is contained in:
Fabien Potencier 2011-09-29 10:04:54 +02:00
parent e02915b09d
commit d171d39b5d

View File

@ -32,7 +32,7 @@ class QtTranslationsLoader implements LoaderInterface
{
$dom = new \DOMDocument();
$current = libxml_use_internal_errors(true);
if (!@$dom->load($resource, LIBXML_COMPACT)) {
if (!@$dom->load($resource, defined('LIBXML_COMPACT') ? LIBXML_COMPACT : 0)) {
throw new \RuntimeException(implode("\n", $this->getXmlErrors()));
}