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
This commit is contained in:
Mark Jaquith 2008-05-09 18:23:05 +00:00
parent 192442345d
commit abbb8b8da3

View File

@ -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']) )