From 239e36bc0a22164425907182dca1769fb9449505 Mon Sep 17 00:00:00 2001 From: nacin Date: Wed, 19 Oct 2011 22:49:45 +0000 Subject: [PATCH] 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 --- wp-includes/class-wp.php | 4 ++-- wp-includes/rewrite.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/class-wp.php b/wp-includes/class-wp.php index 479c3d41e..d136f0888 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 ae4bd8a90..8221b594e 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; }