Avoid notice when handling malformed permalink structure. Props SergeyBiryukov. fixes #18883
git-svn-id: https://develop.svn.wordpress.org/trunk@19322 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f626327800
commit
4bf96f393e
@ -1264,7 +1264,7 @@ class WP_Rewrite {
|
|||||||
$num_toks = preg_match_all('/%.+?%/', $struct, $toks);
|
$num_toks = preg_match_all('/%.+?%/', $struct, $toks);
|
||||||
|
|
||||||
//get the 'tagname=$matches[i]'
|
//get the 'tagname=$matches[i]'
|
||||||
$query = ( isset($queries) && is_array($queries) ) ? $queries[$num_toks - 1] : '';
|
$query = ( isset($queries) && is_array($queries) && !empty($num_toks) ) ? $queries[$num_toks - 1] : '';
|
||||||
|
|
||||||
//set up $ep_mask_specific which is used to match more specific URL types
|
//set up $ep_mask_specific which is used to match more specific URL types
|
||||||
switch ( $dirs[$j] ) {
|
switch ( $dirs[$j] ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user