diff --git a/wp-includes/class-wp.php b/wp-includes/class-wp.php index 479c3d41e8..d136f08885 100644 --- a/wp-includes/class-wp.php +++ b/wp-includes/class-wp.php @@ -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; } diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php index ae4bd8a90b..8221b594e5 100644 --- a/wp-includes/rewrite.php +++ b/wp-includes/rewrite.php @@ -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; }