Do not fire the redirect_canonical filter if the redirect_url is empty. fixes #11700
git-svn-id: http://svn.automattic.com/wordpress/trunk@12692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
145db4bad0
commit
ffe9beca1d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue