From 04bcd011630266632b6de9d9e0965bc9882e30ff Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 25 Sep 2011 10:25:45 +0200 Subject: - Patch #1282986 by valthebald: password of '0' ignored in drupal_http_request(). --- includes/common.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'includes') diff --git a/includes/common.inc b/includes/common.inc index c6638dc0f..ba0b6fffe 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -860,7 +860,7 @@ function drupal_http_request($url, array $options = array()) { // If the server URL has a user then attempt to use basic authentication. if (isset($uri['user'])) { - $options['headers']['Authorization'] = 'Basic ' . base64_encode($uri['user'] . (!empty($uri['pass']) ? ":" . $uri['pass'] : '')); + $options['headers']['Authorization'] = 'Basic ' . base64_encode($uri['user'] . (isset($uri['pass']) ? ':' . $uri['pass'] : '')); } // If the database prefix is being used by SimpleTest to run the tests in a copied -- cgit v1.2.3