@@ -1903,7 +1903,6 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
1903
1903
case CURLOPT_COOKIELIST :
1904
1904
case CURLOPT_FTP_ALTERNATIVE_TO_USER :
1905
1905
case CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 :
1906
- case CURLOPT_PASSWORD :
1907
1906
case CURLOPT_PROXYPASSWORD :
1908
1907
case CURLOPT_PROXYUSERNAME :
1909
1908
case CURLOPT_NOPROXY :
@@ -1996,24 +1995,6 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
1996
1995
return ret ;
1997
1996
}
1998
1997
1999
- case CURLOPT_USERPWD :
2000
- case CURLOPT_USERNAME :
2001
- {
2002
- if (Z_ISNULL_P (zvalue )) {
2003
- // Authorization header would be implictly set
2004
- // with an empty string thus we explictly set the option
2005
- // to null to avoid this unwarranted side effect
2006
- error = curl_easy_setopt (ch -> cp , option , NULL );
2007
- } else {
2008
- zend_string * tmp_str ;
2009
- zend_string * str = zval_get_tmp_string (zvalue , & tmp_str );
2010
- zend_result ret = php_curl_option_str (ch , option , ZSTR_VAL (str ), ZSTR_LEN (str ));
2011
- zend_tmp_string_release (tmp_str );
2012
- return ret ;
2013
- }
2014
- break ;
2015
- }
2016
-
2017
1998
/* Curl nullable string options */
2018
1999
case CURLOPT_CUSTOMREQUEST :
2019
2000
case CURLOPT_FTPPORT :
@@ -2037,6 +2018,12 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
2037
2018
case CURLOPT_HSTS :
2038
2019
#endif
2039
2020
case CURLOPT_KRBLEVEL :
2021
+ // Authorization header would be implictly set
2022
+ // with an empty string thus we explictly set the option
2023
+ // to null to avoid this unwarranted side effect
2024
+ case CURLOPT_USERPWD :
2025
+ case CURLOPT_USERNAME :
2026
+ case CURLOPT_PASSWORD :
2040
2027
{
2041
2028
if (Z_ISNULL_P (zvalue )) {
2042
2029
error = curl_easy_setopt (ch -> cp , option , NULL );
0 commit comments