summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2011-09-25 10:25:45 +0200
committerDries Buytaert <dries@buytaert.net>2011-09-25 10:25:45 +0200
commit04bcd011630266632b6de9d9e0965bc9882e30ff (patch)
tree605d39cb2e91642c7661d01afbd556ca02be2609
parent28c48b3e44e0e48e3858bc8a0ce546a80e8d427f (diff)
downloadbrdo-04bcd011630266632b6de9d9e0965bc9882e30ff.tar.gz
brdo-04bcd011630266632b6de9d9e0965bc9882e30ff.tar.bz2
- Patch #1282986 by valthebald: password of '0' ignored in drupal_http_request().
-rw-r--r--includes/common.inc2
1 files changed, 1 insertions, 1 deletions
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