From ea3484e583393c1925fd30990f67d71ba80ce2d4 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Mon, 28 Jul 2014 02:52:51 +0200 Subject: [PATCH] #6301 - adding some spacing while checking logic --- library/Zend/Http/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Zend/Http/Client.php b/library/Zend/Http/Client.php index e67d2931735..4ac7b820efd 100644 --- a/library/Zend/Http/Client.php +++ b/library/Zend/Http/Client.php @@ -719,6 +719,7 @@ public function setAuth($user, $password, $type = self::AUTH_BASIC) if (!defined('static::AUTH_' . strtoupper($type))) { throw new Exception\InvalidArgumentException("Invalid or not supported authentication type: '$type'"); } + if (empty($user)) { throw new Exception\InvalidArgumentException("The username cannot be empty"); } @@ -727,7 +728,6 @@ public function setAuth($user, $password, $type = self::AUTH_BASIC) 'user' => $user, 'password' => $password, 'type' => $type - ); return $this;