Do not use the "home"-supplied host for canonical redirects if no host is there specified. props thenlich. fixes #6890

git-svn-id: http://svn.automattic.com/wordpress/trunk@7916 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2008-05-09 18:23:05 +00:00
parent 6d3c98a56f
commit 61881c0e82
1 changed files with 2 additions and 1 deletions

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