diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-08-13 07:11:18 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-08-13 07:11:18 +0000 |
commit | ab4e39da832da4929df3c0a327dffb657f24b544 (patch) | |
tree | dc7cc9a4a9ecf075cbf63943ee14633cefebb026 /includes/common.inc | |
parent | 774d060142d400abb5daf61614b35a62750337d6 (diff) | |
download | brdo-ab4e39da832da4929df3c0a327dffb657f24b544.tar.gz brdo-ab4e39da832da4929df3c0a327dffb657f24b544.tar.bz2 |
- Patch #283806 by mustafau: fixed bug in drupal_http_request() and added some first drupal_http_request() tests to core. Yay.
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 e791deca2..7a61a7512 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -436,13 +436,13 @@ function drupal_http_request($url, $headers = array(), $method = 'GET', $data = // Parse the URL and make sure we can handle the schema. $uri = parse_url($url); - if (!isset($uri['scheme'])) { - $result->error = 'missing schema'; + if ($uri == FALSE) { + $result->error = 'unable to parse URL'; return $result; } - if (!isset($uri['host'])) { - $result->error = 'missing host'; + if (!isset($uri['scheme'])) { + $result->error = 'missing schema'; return $result; } |