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

Error when updating to 1.8.0: Argument 1 passed to PhpOffice\PhpSpreadsheet\Reader\Xlsx\Styles::setStyleBaseData() must be an instance of PhpOffice\PhpSpreadsheet\Reader\Xlsx\Theme, null given #1043

Closed
kissifrot opened this issue Jul 1, 2019 · 3 comments

Comments

@kissifrot
Copy link

kissifrot commented Jul 1, 2019

This is:

- [ x] a bug report

What is the expected behavior?

No error when loading a (valid) XLSX file

What is the current behavior?

TypeError: Argument 1 passed to PhpOffice\PhpSpreadsheet\Reader\Xlsx\Styles::setStyleBaseData() must be an instance of PhpOffice\PhpSpreadsheet\Reader\Xlsx\Theme, null given, called in vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx.php on line 584

What are the steps to reproduce?

<?php

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

use PhpOffice\PhpSpreadsheet\IOFactory;

$filepath = 'a/valid/xlsx/file';
$reader = IOFactory::createReaderForFile($filepath);
$reader->setReadDataOnly(true);
$spreadsheet = $reader->load($filepath);

// add code that show the issue here...

Which versions of PhpSpreadsheet and PHP are affected?

PhpSpreadsheet v1.8.0
PHP 7.2.19

@vedmant
Copy link

vedmant commented Jul 1, 2019

I have the same issue after upgrading from 1.3.

@karser
Copy link

karser commented Jul 1, 2019

I encountered the same issue The error is only for xlsx. Xls works fine.

@MarkBaker
Copy link
Member

Should be resolved in 1.8.1

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

4 participants