mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-11-03 17:58:04 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user