X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FXML.php;h=47619c1c6a5a13eca6554b2e2389a744adadf97e;hb=d2c8abd4350590e07973855ce2bccb3d3ff9780e;hp=278ca494c3afb963c41af31d416aaad41c815c27;hpb=d1ae16d11c8eaf40d7489f4a2d4605ef2f7c607c;p=civicrm-core.git diff --git a/CRM/Utils/XML.php b/CRM/Utils/XML.php index 278ca494c3..47619c1c6a 100644 --- a/CRM/Utils/XML.php +++ b/CRM/Utils/XML.php @@ -36,9 +36,10 @@ class CRM_Utils_XML { $oldLibXMLErrors = libxml_use_internal_errors(); libxml_use_internal_errors(TRUE); - $xml = simplexml_load_file($file, - 'SimpleXMLElement', LIBXML_NOCDATA - ); + // Note that under obscure circumstances calling simplexml_load_file + // hit https://bugs.php.net/bug.php?id=62577 + $string = file_get_contents($file); + $xml = simplexml_load_string($string, 'SimpleXMLElement', LIBXML_NOCDATA); if ($xml === FALSE) { $error = self::formatErrors(libxml_get_errors()); }