Loosen type checking to allow both use-cases

Previously it crashed when loading an file containing conditional formatting

FIX #21
This commit is contained in:
Adrien Crivelli 2016-10-05 14:06:39 +09:00
parent d32b4c423c
commit 2b41bdbf4e
No known key found for this signature in database
GPG Key ID: B182FD79DC6DE92E
1 changed files with 2 additions and 2 deletions

View File

@ -1875,9 +1875,9 @@ class Excel2007 extends BaseReader implements IReader
/** /**
* @param \PhpOffice\PhpSpreadsheet\Style $docStyle * @param \PhpOffice\PhpSpreadsheet\Style $docStyle
* @param \stdClass $style * @param \stdClass|\SimpleXMLElement $style
*/ */
private static function readStyle($docStyle, \stdClass $style) private static function readStyle(\PhpOffice\PhpSpreadsheet\Style $docStyle, $style)
{ {
$docStyle->getNumberFormat()->setFormatCode($style->numFmt); $docStyle->getNumberFormat()->setFormatCode($style->numFmt);