[wp-trac] [WordPress Trac] #44543: PHP 7.3 compatibility: using `continue` in `switch` statements

WordPress Trac noreply at wordpress.org
Thu Oct 18 03:41:49 UTC 2018

#44543: PHP 7.3 compatibility: using `continue` in `switch` statements
 Reporter:  jrf                                 |       Owner:  jrf
     Type:  defect (bug)                        |      Status:  closed
 Priority:  normal                              |   Milestone:  5.0
Component:  General                             |     Version:  trunk
 Severity:  normal                              |  Resolution:  fixed
 Keywords:  has-patch commit fixed-major php73  |     Focuses:
Changes (by SergeyBiryukov):

 * status:  reopened => closed
 * resolution:   => fixed


 In [changeset:"43746" 43746]:
 #!CommitTicketReference repository="" revision="43746"
 General: PHP 7.3 throws an `E_WARNING` when using continue to target a

 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 5.0 branch.
 Fixes #44543.

Ticket URL: <https://core.trac.wordpress.org/ticket/44543#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list