mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
For clarity, initialize some arrays that previously were only assigned via short circuit in loops.
See #30799. git-svn-id: https://develop.svn.wordpress.org/trunk@30982 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1288,6 +1288,7 @@ class WP_Rewrite {
|
||||
$trackbackindex = $index;
|
||||
//build a list from the rewritecode and queryreplace arrays, that will look something like
|
||||
//tagname=$matches[i] where i is the current $i
|
||||
$queries = array();
|
||||
for ( $i = 0; $i < $num_tokens; ++$i ) {
|
||||
if ( 0 < $i )
|
||||
$queries[$i] = $queries[$i - 1] . '&';
|
||||
@@ -1328,7 +1329,7 @@ class WP_Rewrite {
|
||||
$num_toks = preg_match_all('/%.+?%/', $struct, $toks);
|
||||
|
||||
//get the 'tagname=$matches[i]'
|
||||
$query = ( isset($queries) && is_array($queries) && !empty($num_toks) ) ? $queries[$num_toks - 1] : '';
|
||||
$query = ( ! empty( $num_toks ) && isset( $queries[$num_toks - 1] ) ) ? $queries[$num_toks - 1] : '';
|
||||
|
||||
//set up $ep_mask_specific which is used to match more specific URL types
|
||||
switch ( $dirs[$j] ) {
|
||||
|
||||
Reference in New Issue
Block a user