nuovo / spreadsheet-reader

A PHP spreadsheet reader (Excel XLS and XLSX, OpenOffice ODS, and variously separated text files) with a singular goal of getting the data out, efficiently
http://www.nuovo.lv/
Other
674 stars 497 forks source link

Warning on switch (break/continue) under PHP7.3 #156

Open alesinicio opened 5 years ago

alesinicio commented 5 years ago

One of the new things in PHP 7.3 is that it emmits a warning when using a continue statement under a switch case. The correct way to do it is to: 1) use the regular break statement (to break out of the switch); or 2) use the continue 2 statement to break out of an outer loop.

This (now incorrect) use of dubious continue statement is present on four lines of the SpreadsheetReader_XLSX class (456, 581, 1049, 1083).

By reading the code it seems you meant to use a simple break.

I'll be adding a pull request to fix this issue, but leave it here as an issue since the repo seems kinda abandoned.

jorix commented 5 years ago

@alesinicio

I'll be adding a pull request to fix this issue, but leave it here as an issue since the repo seems kinda abandoned.

Yes, this seems :- (
(other PR of __construct() to use PHP7 are also ignored)

See at fujaru/spreadsheet-reader, it seems that he has gone a little way and pick up some PR.

The truth with so many forks, it is difficult to choose that is still alive...