From 4f48c60803b896973844973eb6bbed499fd4a5b2 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Wed, 4 Oct 2017 02:12:46 +0000 Subject: [PATCH] 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 --- wp-includes/pomo/plural-forms.php | 14 +++++++------- wp-includes/version.php | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/wp-includes/pomo/plural-forms.php b/wp-includes/pomo/plural-forms.php index 6dbfbfd774..a41c659598 100644 --- a/wp-includes/pomo/plural-forms.php +++ b/wp-includes/pomo/plural-forms.php @@ -69,7 +69,7 @@ class Plural_Forms { * @since 4.9.0 * @var array $cache Map of $n => $result */ - protected $cache = []; + protected $cache = array(); /** * Constructor. @@ -111,7 +111,7 @@ class Plural_Forms { // Variable (n) case 'n': - $output[] = [ 'var' ]; + $output[] = array( 'var' ); $pos++; break; @@ -126,7 +126,7 @@ class Plural_Forms { while ( ! empty( $stack ) ) { $o2 = $stack[ count( $stack ) - 1 ]; if ( $o2 !== '(' ) { - $output[] = [ 'op', array_pop( $stack ) ]; + $output[] = array( 'op', array_pop( $stack ) ); continue; } @@ -170,7 +170,7 @@ class Plural_Forms { break; } - $output[] = [ 'op', array_pop( $stack ) ]; + $output[] = array( 'op', array_pop( $stack ) ); } $stack[] = $operator; @@ -184,7 +184,7 @@ class Plural_Forms { while ( $s_pos >= 0 ) { $o2 = $stack[ $s_pos ]; if ( $o2 !== '?' ) { - $output[] = [ 'op', array_pop( $stack ) ]; + $output[] = array( 'op', array_pop( $stack ) ); $s_pos--; continue; } @@ -205,7 +205,7 @@ class Plural_Forms { default: if ( $next >= '0' && $next <= '9' ) { $span = strspn( $str, self::NUM_CHARS, $pos ); - $output[] = [ 'value', intval( substr( $str, $pos, $span ) ) ]; + $output[] = array( 'value', intval( substr( $str, $pos, $span ) ) ); $pos += $span; continue; } @@ -220,7 +220,7 @@ class Plural_Forms { throw new Exception( 'Mismatched parentheses' ); } - $output[] = [ 'op', $o2 ]; + $output[] = array( 'op', $o2 ); } $this->tokens = $output; diff --git a/wp-includes/version.php b/wp-includes/version.php index 11a62f53f4..7769345e94 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @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.