From abbb8b8da33119c799ee4561e15672a7d8c6208f Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Fri, 9 May 2008 18:23:05 +0000 Subject: [PATCH] Do not use the "home"-supplied host for canonical redirects if no host is there specified. props thenlich. fixes #6890 git-svn-id: https://develop.svn.wordpress.org/trunk@7916 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/canonical.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/canonical.php b/wp-includes/canonical.php index a5c83ceff3..1c391292cf 100644 --- a/wp-includes/canonical.php +++ b/wp-includes/canonical.php @@ -137,7 +137,8 @@ function redirect_canonical($requested_url=null, $do_redirect=true) { // www.example.com vs example.com $user_home = @parse_url(get_option('home')); - $redirect['host'] = $user_home['host']; + if ( isset($user_home['host']) ) + $redirect['host'] = $user_home['host']; // Handle ports if ( isset($user_home['port']) )