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

git-svn-id: http://svn.automattic.com/wordpress/trunk@19017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-10-19 22:49:45 +00:00
parent b957c72f9a
commit 239e36bc0a
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;
}