Skip to content

Function libxml_disable_entity_loader() is deprecated in...\phpoffice\phpspreadsheet\src\PhpSpreadsheet\Reader\Security\XmlScanner.php on line 67 #2125

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

Closed
TheRealMajaba opened this issue May 28, 2021 · 4 comments

Comments

@TheRealMajaba
Copy link

This is:

- [x] a bug report
- [ ] a feature request
- [ ] **not** a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadsheet)

What is the expected behavior?

Work like it did prior to PHP 8.0

What is the current behavior?

Throws errors and warnings but seems to still be functional

What are the steps to reproduce?

Please provide a Minimal, Complete, and Verifiable example of code that exhibits the issue without relying on an external Excel file or a web server:

<?php

require __DIR__ . '/vendor/autoload.php';

// Create new Spreadsheet object
$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();

// add code that show the issue here...
/** Assign uploaded file to a variable */
$inputFileName = $_FILES['import']['tmp_name'];

/**  Identify the type of $inputFileName  **/
$inputFileType = \PhpOffice\PhpSpreadsheet\IOFactory::identify($inputFileName); /** throws error **/
/**  Create a new Reader of the type that has been identified  **/
$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileType); /** throws error **/



### Which versions of PhpSpreadsheet and PHP are affected?
^1.8 and 8.0
@oleibman
Copy link
Collaborator

This was fixed in October 2020 by PR #1625, which was included in release 1.15.0.

@TheRealMajaba
Copy link
Author

The fix doesn't seem to be included in the 1.8.2 that you get with a normal composer update

@oleibman
Copy link
Collaborator

1.8.2 is a very old release - it dates back to July 2019. 1.15.0, which fixed the problem, was over a year later. Is there something that prevents you from moving to the current released version (1.17.1) or master?

@TheRealMajaba
Copy link
Author

Must be some sort of problem with composer then, since composer update always updates me to 1.8.2. Thank you for the help

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