[wp-trac] [WordPress Trac] #44543: PHP 7.3 compatibility: using `continue` in `switch` statements
WordPress Trac
noreply at wordpress.org
Mon Sep 24 20:04:59 UTC 2018
#44543: PHP 7.3 compatibility: using `continue` in `switch` statements
------------------------------------------+---------------------
Reporter: jrf | Owner: jrf
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.9.9
Component: General | Version: trunk
Severity: normal | Resolution: fixed
Keywords: has-patch commit fixed-major | Focuses:
------------------------------------------+---------------------
Changes (by SergeyBiryukov):
* status: reopened => closed
* resolution: => fixed
Comment:
In [changeset:"43656" 43656]:
{{{
#!CommitTicketReference repository="" revision="43656"
General: PHP 7.3 throws an `E_WARNING` when using continue to target a
switch.
Applying continue to a switch is equivalent to using break and quite
possibly, a continue targeting a higher level control structure is
actually intended.
To target the higher level control structure, a numeric argument has to be
passed to continue. This fixes two cases in WordPress Core where this is
currently happening.
See: https://github.com/php/php-src/pull/3364
See: https://wiki.php.net/rfc/continue_on_switch_deprecation
Props jrf.
Merges [43653] to the 4.9 branch.
Fixes #44543.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44543#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list