mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-30 04:01:47 +00:00
Make password optional when using basic authentication
This commit is contained in:
+1
-1
@@ -149,7 +149,7 @@ class Curl
|
||||
return $this->exec();
|
||||
}
|
||||
|
||||
public function setBasicAuthentication($username, $password)
|
||||
public function setBasicAuthentication($username, $password = '')
|
||||
{
|
||||
$this->setOpt(CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
|
||||
$this->setOpt(CURLOPT_USERPWD, $username . ':' . $password);
|
||||
|
||||
Reference in New Issue
Block a user