Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP speadsheet modifies libxml_disable_entity_loader value #787

Closed
1 task done
stephane-de opened this issue Nov 23, 2018 · 1 comment
Closed
1 task done

PHP speadsheet modifies libxml_disable_entity_loader value #787

stephane-de opened this issue Nov 23, 2018 · 1 comment

Comments

@stephane-de
Copy link

stephane-de commented Nov 23, 2018

This is:

  • a bug report

What is the expected behavior?

The value of libxml_disable_entity_loader stay the same after I use PhpSpreadsheet

What is the current behavior?

Since 1.5.1 and #780
The value is changed by :
libxml_disable_entity_loader(true);

What are the steps to reproduce?

(where test.xlsx is any valid xlsx 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();
\PhpOffice\PhpSpreadsheet\IOFactory::load('test.xlsx');

// add code that show the issue here...
$newValue =  libxml_disable_entity_loader(false);
print_r('new value: '.$newValue."\n");

With 1.5.1 :
previous value:
new value: 1

With 1.5.0
previous value:
new value:

Which versions of PhpSpreadsheet and PHP are affected?

PhpSpreadsheet 1.5.1
PHP 7.2

@PowerKiKi
Copy link
Member

Fixed in 8918888

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants