We know that pagename is being assigned to $matches-something, so skip the variable variable. props duck_. see #18991.

git-svn-id: https://develop.svn.wordpress.org/trunk@19017 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2011-10-19 22:49:45 +00:00
parent 2c83b5728f
commit d4bbfbad98
2 changed files with 4 additions and 4 deletions

View File

@ -201,9 +201,9 @@ class WP {
if ( preg_match("#^$match#", $request_match, $matches) ||
preg_match("#^$match#", urldecode($request_match), $matches) ) {
if ( $wp_rewrite->use_verbose_page_rules && preg_match( '/pagename=\$([^&\[]+)\[([0-9]+)\]/', $query, $varmatch ) ) {
if ( $wp_rewrite->use_verbose_page_rules && preg_match( '/pagename=\$matches\[([0-9]+)\]/', $query, $varmatch ) ) {
// this is a verbose page match, lets check to be sure about it
if ( ! get_page_by_path( ${$varmatch[1]}[$varmatch[2]] ) )
if ( ! get_page_by_path( $matches[ $varmatch[1] ] ) )
continue;
}

View File

@ -314,9 +314,9 @@ function url_to_postid($url) {
if ( preg_match("!^$match!", $request_match, $matches) ) {
if ( $wp_rewrite->use_verbose_page_rules && preg_match( '/pagename=\$([^&\[]+)\[([0-9]+)\]/', $query, $varmatch ) ) {
if ( $wp_rewrite->use_verbose_page_rules && preg_match( '/pagename=\$matches\[([0-9]+)\]/', $query, $varmatch ) ) {
// this is a verbose page match, lets check to be sure about it
if ( ! get_page_by_path( ${$varmatch[1]}[$varmatch[2]] ) )
if ( ! get_page_by_path( $matches[ $varmatch[1] ] ) )
continue;
}