Project

General

Profile

Actions

Bug #9365

closed

Use of "continue" in switch statements can be ambiguous

Added by Jim Pingle almost 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
PHP Interpreter
Target version:
Start date:
03/05/2019
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.5.0
Affected Architecture:
All

Description

PHP 7.3 is tightening down on the use of continue in switches. There are instances where the code meant to continue through a foreach or other loop but didn't have the right number set on continue statements, which made them equivalent to a break which was most likely not what was intended.

http://php.net/manual/en/migration73.incompatible.php#migration73.incompatible.core.continue-targeting-switch

Below are the errors spotted so far. Add more in comments.

PHP Warning:  "continue 2" targeting switch is equivalent to "break 2". Did you mean to use "continue 3"? in /etc/inc/gwlb.inc on line 747
PHP Warning:  "continue 2" targeting switch is equivalent to "break 2". Did you mean to use "continue 3"? in /etc/inc/gwlb.inc on line 889
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /usr/local/pkg/frr/inc/frr_zebra.inc on line 211
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /usr/local/pkg/frr/inc/frr_zebra.inc on line 572
Actions

Also available in: Atom PDF