Skip to content

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

@TheRealMajaba

Description

@TheRealMajaba

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions