Make WordPress Core

Changeset 41723


Ignore:
Timestamp:
10/04/2017 02:11:27 AM (7 years ago)
Author:
pento
Message:

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

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

Fixes #41562.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/pomo/plural-forms.php

    r41722 r41723  
    7070     * @var array $cache Map of $n => $result
    7171     */
    72     protected $cache = [];
     72    protected $cache = array();
    7373
    7474    /**
     
    112112                // Variable (n)
    113113                case 'n':
    114                     $output[] = [ 'var' ];
     114                    $output[] = array( 'var' );
    115115                    $pos++;
    116116                    break;
     
    127127                        $o2 = $stack[ count( $stack ) - 1 ];
    128128                        if ( $o2 !== '(' ) {
    129                             $output[] = [ 'op', array_pop( $stack ) ];
     129                            $output[] = array( 'op', array_pop( $stack ) );
    130130                            continue;
    131131                        }
     
    171171                        }
    172172
    173                         $output[] = [ 'op', array_pop( $stack ) ];
     173                        $output[] = array( 'op', array_pop( $stack ) );
    174174                    }
    175175                    $stack[] = $operator;
     
    185185                        $o2 = $stack[ $s_pos ];
    186186                        if ( $o2 !== '?' ) {
    187                             $output[] = [ 'op', array_pop( $stack ) ];
     187                            $output[] = array( 'op', array_pop( $stack ) );
    188188                            $s_pos--;
    189189                            continue;
     
    206206                    if ( $next >= '0' && $next <= '9' ) {
    207207                        $span = strspn( $str, self::NUM_CHARS, $pos );
    208                         $output[] = [ 'value', intval( substr( $str, $pos, $span ) ) ];
     208                        $output[] = array( 'value', intval( substr( $str, $pos, $span ) ) );
    209209                        $pos += $span;
    210210                        continue;
     
    221221            }
    222222
    223             $output[] = [ 'op', $o2 ];
     223            $output[] = array( 'op', $o2 );
    224224        }
    225225
Note: See TracChangeset for help on using the changeset viewer.