Skip to content

Commit 9022c39

Browse files
brainfoolongPowerKiKi
authored andcommitted
fixes for continue inside switch statement (#660)
This a bugfix for php 7.3 related errors where using continue inside a switch raises a PHP warning. Either use continue 2 or break. Previously continue behaves like break but the intended usage is to continue the for loop instead.
1 parent 01501b6 commit 9022c39

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/PhpSpreadsheet/Reader/Xls.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,7 @@ public function load($pFilename)
11271127
// TODO: Why is there no BSE Index? Is this a new Office Version? Password protected field?
11281128
// More likely : a uncompatible picture
11291129
if (!$BSEindex) {
1130-
continue;
1130+
continue 2;
11311131
}
11321132

11331133
$BSECollection = $escherWorkbook->getDggContainer()->getBstoreContainer()->getBSECollection();

src/PhpSpreadsheet/Shared/OLE.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ public function _readPpsWks($blockId)
320320

321321
break;
322322
default:
323-
continue;
323+
break;
324324
}
325325
fseek($fh, 1, SEEK_CUR);
326326
$pps->Type = $type;

0 commit comments

Comments
 (0)