summaryrefslogtreecommitdiff
path: root/includes/common.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/common.inc')
-rw-r--r--includes/common.inc8
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;
}