mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-09 00:51:35 +01:00
General: PHP7.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. Fixes #44543. Built from https://develop.svn.wordpress.org/trunk@43653 git-svn-id: http://core.svn.wordpress.org/trunk@43482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0929610414
commit
76ef0432c0
@ -207,7 +207,7 @@ class Plural_Forms {
|
|||||||
$span = strspn( $str, self::NUM_CHARS, $pos );
|
$span = strspn( $str, self::NUM_CHARS, $pos );
|
||||||
$output[] = array( 'value', intval( substr( $str, $pos, $span ) ) );
|
$output[] = array( 'value', intval( substr( $str, $pos, $span ) ) );
|
||||||
$pos += $span;
|
$pos += $span;
|
||||||
continue;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new Exception( sprintf( 'Unknown symbol "%s"', $next ) );
|
throw new Exception( sprintf( 'Unknown symbol "%s"', $next ) );
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.0-alpha-43652';
|
$wp_version = '5.0-alpha-43653';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user