diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-12-11 12:31:17 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-12-11 12:31:17 +0000 |
commit | b9f2b7e2a6b7769457f2f7d4aa361788314e2ed5 (patch) | |
tree | 5a0dc2f5a7a36d91e9298a9a8f63580931a9ac69 /includes/common.inc | |
parent | 0eb731d5e2885da281a9b97b2295b1182f25741c (diff) | |
download | brdo-b9f2b7e2a6b7769457f2f7d4aa361788314e2ed5.tar.gz brdo-b9f2b7e2a6b7769457f2f7d4aa361788314e2ed5.tar.bz2 |
- Patch #40706 by chx: fixed warnings.
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/common.inc b/includes/common.inc index cdbe8c67c..7c676e5e0 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -332,12 +332,12 @@ function drupal_http_request($url, $headers = array(), $method = 'GET', $data = $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, $headers = array(), $method = 'GET', $data = } // 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']; } |