Skip to content

Commit cc1800a

Browse files
committed
ITST-16211
- Fix cellFormats/cellStyles not working with some files
1 parent fc68b05 commit cc1800a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Reader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@ private function initStyles(ZipArchive $zip)
11371137
$current_scope_is_num_fmts = !$styles_reader->isClosingTag();
11381138
break;
11391139
case 'numFmt':
1140-
if (!$current_scope_is_num_fmts) {
1140+
if (!$current_scope_is_num_fmts || $styles_reader->isClosingTag()) {
11411141
break;
11421142
}
11431143
$format_code = (string) $styles_reader->getAttributeNsId('formatCode');
@@ -1150,7 +1150,7 @@ private function initStyles(ZipArchive $zip)
11501150
$current_scope_is_cell_xfs = !$styles_reader->isClosingTag();
11511151
break;
11521152
case 'xf':
1153-
if (!$current_scope_is_cell_xfs) {
1153+
if (!$current_scope_is_cell_xfs || $styles_reader->isClosingTag()) {
11541154
break;
11551155
}
11561156
// Check if the found number format should actually be applied.

0 commit comments

Comments
 (0)