Make WordPress Core


Ignore:
Timestamp:
12/20/2014 10:46:53 PM (10 years ago)
Author:
wonderboymusic
Message:

For clarity, initialize some arrays that previously were only assigned via short circuit in loops.

See #30799.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rewrite.php

    r30703 r30982  
    12891289        //build a list from the rewritecode and queryreplace arrays, that will look something like
    12901290        //tagname=$matches[i] where i is the current $i
     1291        $queries = array();
    12911292        for ( $i = 0; $i < $num_tokens; ++$i ) {
    12921293            if ( 0 < $i )
     
    13291330
    13301331            //get the 'tagname=$matches[i]'
    1331             $query = ( isset($queries) && is_array($queries) && !empty($num_toks) ) ? $queries[$num_toks - 1] : '';
     1332            $query = ( ! empty( $num_toks ) && isset( $queries[$num_toks - 1] ) ) ? $queries[$num_toks - 1] : '';
    13321333
    13331334            //set up $ep_mask_specific which is used to match more specific URL types
Note: See TracChangeset for help on using the changeset viewer.