From 9022c39dd8cd18b49bd6410edb971636f5c1c72b Mon Sep 17 00:00:00 2001 From: Roland Eigelsreiter Date: Sat, 29 Sep 2018 18:11:24 +0200 Subject: [PATCH] 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. --- src/PhpSpreadsheet/Reader/Xls.php | 2 +- src/PhpSpreadsheet/Shared/OLE.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PhpSpreadsheet/Reader/Xls.php b/src/PhpSpreadsheet/Reader/Xls.php index 3416c358..e6803c78 100644 --- a/src/PhpSpreadsheet/Reader/Xls.php +++ b/src/PhpSpreadsheet/Reader/Xls.php @@ -1127,7 +1127,7 @@ class Xls extends BaseReader // TODO: Why is there no BSE Index? Is this a new Office Version? Password protected field? // More likely : a uncompatible picture if (!$BSEindex) { - continue; + continue 2; } $BSECollection = $escherWorkbook->getDggContainer()->getBstoreContainer()->getBSECollection(); diff --git a/src/PhpSpreadsheet/Shared/OLE.php b/src/PhpSpreadsheet/Shared/OLE.php index d78c0795..2e9ec256 100644 --- a/src/PhpSpreadsheet/Shared/OLE.php +++ b/src/PhpSpreadsheet/Shared/OLE.php @@ -320,7 +320,7 @@ class OLE break; default: - continue; + break; } fseek($fh, 1, SEEK_CUR); $pps->Type = $type;