From bc12ccf41b53a72f3ff04d07214f3da1d64a19f6 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sat, 29 Mar 2014 05:18:15 +0000 Subject: [PATCH] Rewrite: Use same delimiter in url_to_postid() we use in WP::parse_request(). props stevenkword. fixes #23587. Built from https://develop.svn.wordpress.org/trunk@27835 git-svn-id: http://core.svn.wordpress.org/trunk@27669 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/rewrite.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php index 6a3dd58ce8..1b834c829e 100644 --- a/wp-includes/rewrite.php +++ b/wp-includes/rewrite.php @@ -362,7 +362,7 @@ function url_to_postid($url) { if ( !empty($url) && ($url != $request) && (strpos($match, $url) === 0) ) $request_match = $url . '/' . $request; - if ( preg_match("!^$match!", $request_match, $matches) ) { + if ( preg_match("#^$match#", $request_match, $matches) ) { 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