Some notice fixes from Nazgul. fixes #3155

git-svn-id: https://develop.svn.wordpress.org/trunk@6711 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-02-02 18:42:09 +00:00
parent bc75594504
commit 60b802e55d
12 changed files with 31 additions and 28 deletions

View File

@@ -775,7 +775,7 @@ function wp_safe_redirect($location, $status = 302) {
$lp = parse_url($location);
$wpp = parse_url(get_option('home'));
$allowed_hosts = (array) apply_filters('allowed_redirect_hosts', array($wpp['host']), $lp['host']);
$allowed_hosts = (array) apply_filters('allowed_redirect_hosts', array($wpp['host']), isset($lp['host']) ? $lp['host'] : '');
if ( isset($lp['host']) && ( !in_array($lp['host'], $allowed_hosts) && $lp['host'] != strtolower($wpp['host'])) )
$location = get_option('siteurl') . '/wp-admin/';