=== modified file 'includes/common.inc' --- includes/common.inc +++ includes/common.inc @@ -332,12 +332,12 @@ function drupal_http_request($url, $head $uri = parse_url($url); switch ($uri['scheme']) { case 'http': - $port = $uri['port'] ? $uri['port'] : 80; + $port = isset($uri['port']) ? $uri['port'] : 80; $fp = @fsockopen($uri['host'], $port, $errno, $errstr, 15); break; case 'https': // Note: Only works for PHP 4.3 compiled with OpenSSL. - $port = $uri['port'] ? $uri['port'] : 443; + $port = isset($uri['port']) ? $uri['port'] : 443; $fp = @fsockopen('ssl://'. $uri['host'], $port, $errno, $errstr, 20); break; default: @@ -352,8 +352,8 @@ function drupal_http_request($url, $head } // Construct the path to act on. - $path = $uri['path'] ? $uri['path'] : '/'; - if ($uri['query']) { + $path = isset($uri['path']) ? $uri['path'] : '/'; + if (isset($uri['query'])) { $path .= '?'. $uri['query']; }