Bugfix: Work Item GH-384 - DOM loadHTMLFile() failing with options flags when using PHP < 5.4.0

Additional check that libxml is running at an appropriate version by testing if libxml flag value constants are defined
This commit is contained in:
MarkBaker
2014-09-05 10:20:12 +01:00
parent 57ce19d20a
commit f77d3d1668
3 changed files with 10 additions and 6 deletions
+1 -1
View File
@@ -424,7 +424,7 @@ class PHPExcel_Reader_HTML extends PHPExcel_Reader_Abstract implements PHPExcel_
// Create a new DOM object
$dom = new DOMDocument;
// Reload the HTML file into the DOM object
if (version_compare(PHP_VERSION, '5.4.0') >= 0) {
if ((version_compare(PHP_VERSION, '5.4.0') >= 0) && defined(LIBXML_DTDLOAD)) {
$loaded = $dom->loadHTMLFile($pFilename, PHPExcel_Settings::getLibXmlLoaderOptions());
} else {
$loaded = $dom->loadHTMLFile($pFilename);