I18N: Fix a PHP error introduced in [41722].

PHP 5.2 and 5.3 don't support short array syntax, Ryan.

Fixes #41562.


Built from https://develop.svn.wordpress.org/trunk@41723


git-svn-id: http://core.svn.wordpress.org/trunk@41557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2017-10-04 02:12:46 +00:00
parent 0a3b7d8e31
commit 4f48c60803
2 changed files with 8 additions and 8 deletions

View File

@ -69,7 +69,7 @@ class Plural_Forms {
* @since 4.9.0 * @since 4.9.0
* @var array $cache Map of $n => $result * @var array $cache Map of $n => $result
*/ */
protected $cache = []; protected $cache = array();
/** /**
* Constructor. * Constructor.
@ -111,7 +111,7 @@ class Plural_Forms {
// Variable (n) // Variable (n)
case 'n': case 'n':
$output[] = [ 'var' ]; $output[] = array( 'var' );
$pos++; $pos++;
break; break;
@ -126,7 +126,7 @@ class Plural_Forms {
while ( ! empty( $stack ) ) { while ( ! empty( $stack ) ) {
$o2 = $stack[ count( $stack ) - 1 ]; $o2 = $stack[ count( $stack ) - 1 ];
if ( $o2 !== '(' ) { if ( $o2 !== '(' ) {
$output[] = [ 'op', array_pop( $stack ) ]; $output[] = array( 'op', array_pop( $stack ) );
continue; continue;
} }
@ -170,7 +170,7 @@ class Plural_Forms {
break; break;
} }
$output[] = [ 'op', array_pop( $stack ) ]; $output[] = array( 'op', array_pop( $stack ) );
} }
$stack[] = $operator; $stack[] = $operator;
@ -184,7 +184,7 @@ class Plural_Forms {
while ( $s_pos >= 0 ) { while ( $s_pos >= 0 ) {
$o2 = $stack[ $s_pos ]; $o2 = $stack[ $s_pos ];
if ( $o2 !== '?' ) { if ( $o2 !== '?' ) {
$output[] = [ 'op', array_pop( $stack ) ]; $output[] = array( 'op', array_pop( $stack ) );
$s_pos--; $s_pos--;
continue; continue;
} }
@ -205,7 +205,7 @@ class Plural_Forms {
default: default:
if ( $next >= '0' && $next <= '9' ) { if ( $next >= '0' && $next <= '9' ) {
$span = strspn( $str, self::NUM_CHARS, $pos ); $span = strspn( $str, self::NUM_CHARS, $pos );
$output[] = [ 'value', intval( substr( $str, $pos, $span ) ) ]; $output[] = array( 'value', intval( substr( $str, $pos, $span ) ) );
$pos += $span; $pos += $span;
continue; continue;
} }
@ -220,7 +220,7 @@ class Plural_Forms {
throw new Exception( 'Mismatched parentheses' ); throw new Exception( 'Mismatched parentheses' );
} }
$output[] = [ 'op', $o2 ]; $output[] = array( 'op', $o2 );
} }
$this->tokens = $output; $this->tokens = $output;

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.9-alpha-41722'; $wp_version = '4.9-alpha-41723';
/** /**
* 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.