File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -279,13 +279,13 @@ public function next()
279279
280280 $ this ->row_open = true ;
281281
282- /* Getting the row spanning area (stored as e.g., 1:12 )
282+ /* Getting the row spanning area (stored as e.g. "1:12", or more rarely, "1:3 6:8 11:12" )
283283 * so that the last cells will be present, even if empty. */
284284 $ row_spans = $ this ->worksheet_reader ->getAttributeNsId ('spans ' );
285285
286286 if ($ row_spans ) {
287287 $ row_spans = explode (': ' , $ row_spans );
288- $ current_row_column_count = $ row_spans[ 1 ];
288+ $ current_row_column_count = array_pop ( $ row_spans); // Always get the last segment, regardless of spans structure.
289289 } else {
290290 $ current_row_column_count = 0 ;
291291 }
@@ -313,7 +313,7 @@ public function next()
313313 $ row_spans = $ this ->worksheet_reader ->getAttributeNsId ('spans ' );
314314 if ($ row_spans ) {
315315 $ row_spans = explode (': ' , $ row_spans );
316- $ current_row_column_count = $ row_spans[ 1 ];
316+ $ current_row_column_count = array_pop ( $ row_spans); // Always get the last segment, regardless of spans structure.
317317 } else {
318318 $ current_row_column_count = 0 ;
319319 }
You can’t perform that action at this time.
0 commit comments