Bug #69597 [Com]: 'break' not in the 'loop' or 'switch' context

From: Date: Thu, 07 May 2015 18:37:27 +0000
Subject: Bug #69597 [Com]: 'break' not in the 'loop' or 'switch' context
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-192559@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69597&edit=1 ID: 69597 Comment by: benjamin dot balet at gmail dot com Reported by: benjamin dot balet at gmail dot com Summary: 'break' not in the 'loop' or 'switch' context Status: Open Type: Bug Package: Scripting Engine problem Operating System: All PHP Version: master-Git-2015-05-07 (Git) Block user comment: N Private report: N New Comment: Oh, I see that they changed it. Strange that this code was working with PHP5.5/5.6. Anyway, I assume that this is an illegal use of break keyword... My version https://github.com/bbalet/jorani/blob/master/application/third_party/PHPExcel/Calculation/Functions.php#L587 Latest version https://github.com/PHPOffice/PHPExcel/blob/develop/Classes/PHPExcel/Calculation/Functions.php#L587 Latest commit mentions that the break was unnecessary: https://github.com/PHPOffice/PHPExcel/commit/eb768751c6ce8c034bb251f9fd84879cf6b044c1 Previous Comments: ------------------------------------------------------------------------ [2015-05-07 18:24:02] nikic@php.net Could you please past an excerpt (e.g. the body of the containing function) of the code around line 581 or alternatively provide the commit you're using? The code from the master branch of PHPExcel does not have a break in line 581. ------------------------------------------------------------------------ [2015-05-07 18:10:25] benjamin dot balet at gmail dot com Description: ------------ Hi, I've found a bug in PHP7-dev that I can reproduce on Ubuntu/amd64 and Win64/amd64 (but I think it is not OS specific). The bug occurs in - at least - the 10 latest nighly builds. I've discovered it while trying to build an xlsx file with PHPExcel, it displays : 'break' not in the 'loop' or 'switch' context in PHPExcel/Calculation/Functions.php on line 581 I tried to search before submitting this bug and I hope it is not a duplicate. Benjamin Test script: --------------- You can reproduce the bug on my demo: - use bbalet/bbalet to login - Menu "Request", "List of Leave Request" - Button "Export this list" at the bottom of the page. PHP7 (fail): http://php7.jorani.org/ PHP 5.5.12 (pass) : http://demo.jorani.org/ HHVM (pass) : http://hhvm.jorani.org/ The full source of the project is on Github https://github.com/bbalet/jorani And PHPExcel lib: https://github.com/PHPOffice/PHPExcel ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=69597&edit=1

« previous php.bugs (#192559) next »