Do not fire the redirect_canonical filter if the redirect_url is empty. fixes #11700

git-svn-id: https://develop.svn.wordpress.org/trunk@12692 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2010-01-10 19:05:43 +00:00
parent 7263a46dae
commit 2d9af20cc3
1 changed files with 1 additions and 1 deletions

View File

@ -285,7 +285,7 @@ function redirect_canonical($requested_url=null, $do_redirect=true) {
$redirect_url .= '?' . $redirect['query'];
}
if ( $redirect_url == $requested_url )
if ( !$redirect_url || $redirect_url == $requested_url )
return false;
// Note that you can use the "redirect_canonical" filter to cancel a canonical redirect for whatever reason by returning FALSE