Avoid an undefined index notice in wp_http_validate_url().

props jesin.
fixes #27684.

git-svn-id: https://develop.svn.wordpress.org/trunk@27953 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2014-04-05 12:44:19 +00:00
parent 6c7aabda19
commit 4a197c45a2

View File

@ -510,7 +510,7 @@ function wp_http_validate_url( $url ) {
if ( 80 === $port || 443 === $port || 8080 === $port )
return $url;
if ( $parsed_home && $same_host && $parsed_home['port'] === $port )
if ( $parsed_home && $same_host && isset( $parsed_home['port'] ) && $parsed_home['port'] === $port )
return $url;
return false;