Bugfix: Work Item GH-384 - DOM loadHTMLFile() failing with options flags when using PHP < 5.4.0
This commit is contained in:
parent
d777d0283d
commit
a7cf8c63e2
|
@ -424,9 +424,13 @@ class PHPExcel_Reader_HTML extends PHPExcel_Reader_Abstract implements PHPExcel_
|
||||||
// Create a new DOM object
|
// Create a new DOM object
|
||||||
$dom = new DOMDocument;
|
$dom = new DOMDocument;
|
||||||
// Reload the HTML file into the DOM object
|
// Reload the HTML file into the DOM object
|
||||||
|
if (version_compare(PHP_VERSION, '5.4.0') >= 0) {
|
||||||
$loaded = $dom->loadHTMLFile($pFilename, PHPExcel_Settings::getLibXmlLoaderOptions());
|
$loaded = $dom->loadHTMLFile($pFilename, PHPExcel_Settings::getLibXmlLoaderOptions());
|
||||||
|
} else {
|
||||||
|
$loaded = $dom->loadHTMLFile($pFilename);
|
||||||
|
}
|
||||||
if ($loaded === FALSE) {
|
if ($loaded === FALSE) {
|
||||||
throw new PHPExcel_Reader_Exception('Failed to load ',$pFilename,' as a DOM Document');
|
throw new PHPExcel_Reader_Exception('Failed to load '. $pFilename. ' as a DOM Document');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Discard white space
|
// Discard white space
|
||||||
|
@ -438,9 +442,6 @@ class PHPExcel_Reader_HTML extends PHPExcel_Reader_Abstract implements PHPExcel_
|
||||||
$content = '';
|
$content = '';
|
||||||
$this->_processDomElement($dom,$objPHPExcel->getActiveSheet(),$row,$column,$content);
|
$this->_processDomElement($dom,$objPHPExcel->getActiveSheet(),$row,$column,$content);
|
||||||
|
|
||||||
// echo '<hr />';
|
|
||||||
// var_dump($this->_dataArray);
|
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
return $objPHPExcel;
|
return $objPHPExcel;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@ Planned for v1.8.1
|
||||||
- Bugfix: (MBaker) Work Item GH-350 - Keep/set the value on Reader _loadSheetsOnly as NULL, courtesy of Restless-ET
|
- Bugfix: (MBaker) Work Item GH-350 - Keep/set the value on Reader _loadSheetsOnly as NULL, courtesy of Restless-ET
|
||||||
- Bugfix: (MBaker) Work Item CP18105 - Loading an Excel 2007 spreadsheet throws an "Autofilter must be set on a range of cells" exception
|
- Bugfix: (MBaker) Work Item CP18105 - Loading an Excel 2007 spreadsheet throws an "Autofilter must be set on a range of cells" exception
|
||||||
- Bugfix: (MBaker) - Fix to autoloader registration for backward compatibility with PHP 5.2.0 not accepting the prepend flag
|
- Bugfix: (MBaker) - Fix to autoloader registration for backward compatibility with PHP 5.2.0 not accepting the prepend flag
|
||||||
|
- Bugfix: (MBaker) Work Item GH-384 - DOM loadHTMLFile() failing with options flags when using PHP < 5.4.0
|
||||||
- General: (MBaker) - Small performance improvement for autosize columns
|
- General: (MBaker) - Small performance improvement for autosize columns
|
||||||
- General: (frost-nzcr4) Work Item GH-379 - Change the getter/setter for zeroHeight to camel case
|
- General: (frost-nzcr4) Work Item GH-379 - Change the getter/setter for zeroHeight to camel case
|
||||||
- Feature: (WiktrzGE) Work Item GH-404 - Methods to manage most of the existing options for Chart Axis, Major Grid-lines and Minor Grid-lines
|
- Feature: (WiktrzGE) Work Item GH-404 - Methods to manage most of the existing options for Chart Axis, Major Grid-lines and Minor Grid-lines
|
||||||
|
|
Loading…
Reference in New Issue