-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Description
This is:
- a bug report
What is the expected behavior?
The value of libxml_disable_entity_loader
stay the same after I use PhpSpreadsheet
(In this case when I input a PDF file, PHPSpreadsheet fails to open it, and throws an exception, but still, the value of libxml_disable_entity_loader
is changed)
What is the current behavior?
In 1.5.2
The value is changed by :
libxml_disable_entity_loader(true);
What are the steps to reproduce?
(where test.pdf is a valid PDF file)
<?php
require __DIR__ . '/vendor/autoload.php';
$previousValue = libxml_disable_entity_loader(false);
print_r('previous value: '.$previousValue."\n");
// Create new Spreadsheet object
$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
try {
\PhpOffice\PhpSpreadsheet\IOFactory::load('test.pdf');
} catch(\Throwable $e) {
}
// add code that show the issue here...
$newValue = libxml_disable_entity_loader(false);
print_r('new value: '.$newValue."\n");
With phpSpreadsheet 1.5.2
php test.php
previous value:
new value: 1
Metadata
Metadata
Assignees
Labels
No labels