File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -424,7 +424,7 @@ public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel)
424
424
// Create a new DOM object
425
425
$ dom = new DOMDocument ;
426
426
// Reload the HTML file into the DOM object
427
- if (version_compare (PHP_VERSION , '5.4.0 ' ) >= 0 ) {
427
+ if (( version_compare (PHP_VERSION , '5.4.0 ' ) >= 0 ) && defined ( LIBXML_DTDLOAD ) ) {
428
428
$ loaded = $ dom ->loadHTMLFile ($ pFilename , PHPExcel_Settings::getLibXmlLoaderOptions ());
429
429
} else {
430
430
$ loaded = $ dom ->loadHTMLFile ($ pFilename );
Original file line number Diff line number Diff line change @@ -363,10 +363,12 @@ public static function getPdfRendererPath()
363
363
*/
364
364
public static function setLibXmlLoaderOptions ($ options = null )
365
365
{
366
- if (is_null ($ options )) {
366
+ if (is_null ($ options ) && defined ( LIBXML_DTDLOAD ) ) {
367
367
$ options = LIBXML_DTDLOAD | LIBXML_DTDATTR ;
368
368
}
369
- @libxml_disable_entity_loader ($ options == (LIBXML_DTDLOAD | LIBXML_DTDATTR ));
369
+ if (version_compare (PHP_VERSION , '5.2.11 ' ) >= 0 ) {
370
+ @libxml_disable_entity_loader ($ options == (LIBXML_DTDLOAD | LIBXML_DTDATTR ));
371
+ }
370
372
self ::$ _libXmlLoaderOptions = $ options ;
371
373
} // function setLibXmlLoaderOptions
372
374
@@ -378,10 +380,12 @@ public static function setLibXmlLoaderOptions($options = null)
378
380
*/
379
381
public static function getLibXmlLoaderOptions ()
380
382
{
381
- if (is_null (self ::$ _libXmlLoaderOptions )) {
383
+ if (is_null (self ::$ _libXmlLoaderOptions ) && defined ( LIBXML_DTDLOAD ) ) {
382
384
self ::setLibXmlLoaderOptions (LIBXML_DTDLOAD | LIBXML_DTDATTR );
383
385
}
384
- @libxml_disable_entity_loader (self ::$ _libXmlLoaderOptions == (LIBXML_DTDLOAD | LIBXML_DTDATTR ));
386
+ if (version_compare (PHP_VERSION , '5.2.11 ' ) >= 0 ) {
387
+ @libxml_disable_entity_loader (self ::$ _libXmlLoaderOptions == (LIBXML_DTDLOAD | LIBXML_DTDATTR ));
388
+ }
385
389
return self ::$ _libXmlLoaderOptions ;
386
390
} // function getLibXmlLoaderOptions
387
391
}
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ Planned for v1.8.1
29
29
- Bugfix: (MBaker) - Fix to ensure that current cell is maintained when executing formula calculations
30
30
- Bugfix: (MBaker) Work Item GH-350 - Keep/set the value on Reader _loadSheetsOnly as NULL, courtesy of Restless-ET
31
31
- Bugfix: (MBaker) Work Item CP18105 - Loading an Excel 2007 spreadsheet throws an "Autofilter must be set on a range of cells" exception
32
- - Bugfix: (MBaker) - Fix to autoloader registration for backward compatibility with PHP 5.2.0 not accepting the prepend flag
32
+ - Bugfix: (MBaker) Work Item GH-388 - Fix to autoloader registration for backward compatibility with PHP 5.2.0 not accepting the prepend flag
33
33
- Bugfix: (MBaker) Work Item GH-384 - DOM loadHTMLFile() failing with options flags when using PHP < 5.4.0
34
34
- Bugfix: (MBaker) - Fix for percentage operator in formulae for BIFF Writer
35
35
- General: (MBaker) - Small performance improvement for autosize columns
You can’t perform that action at this time.
0 commit comments