From 17bf7548d502083845fcb5be829e801c6ea8c2d6 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 14 Jan 2008 21:44:08 +0000 Subject: [PATCH] Don't double requested url in url_to_postid(). Props filosofo. fixes #5661 git-svn-id: https://develop.svn.wordpress.org/trunk@6614 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 f50a428cbf..127a7ab224 100644 --- a/wp-includes/rewrite.php +++ b/wp-includes/rewrite.php @@ -127,7 +127,7 @@ function url_to_postid($url) { foreach ($rewrite as $match => $query) { // If the requesting file is the anchor of the match, prepend it // to the path info. - if ( (! empty($url)) && (strpos($match, $url) === 0) ) { + if ( (! empty($url)) && (strpos($match, $url) === 0) && ($url != $request)) { $request_match = $url . '/' . $request; }