mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Remove passwd handler from struct when not needed
CURLOPT_PASSWDFUNCTION was removed in cURL 7.15.5, the passwd field will not be used for version greater than this one
This commit is contained in:
parent
a666285bc2
commit
343a9199bb
2 changed files with 4 additions and 0 deletions
|
@ -3267,9 +3267,11 @@ static void _php_curl_close_ex(php_curl *ch TSRMLS_DC)
|
|||
if (ch->handlers->write_header->func_name) {
|
||||
zval_ptr_dtor(&ch->handlers->write_header->func_name);
|
||||
}
|
||||
#if CURLOPT_PASSWDFUNCTION != 0
|
||||
if (ch->handlers->passwd) {
|
||||
zval_ptr_dtor(&ch->handlers->passwd);
|
||||
}
|
||||
#endif
|
||||
if (ch->handlers->std_err) {
|
||||
zval_ptr_dtor(&ch->handlers->std_err);
|
||||
}
|
||||
|
|
|
@ -135,7 +135,9 @@ typedef struct {
|
|||
php_curl_write *write;
|
||||
php_curl_write *write_header;
|
||||
php_curl_read *read;
|
||||
#if CURLOPT_PASSWDFUNCTION != 0
|
||||
zval *passwd;
|
||||
#endif
|
||||
zval *std_err;
|
||||
php_curl_progress *progress;
|
||||
#if LIBCURL_VERSION_NUM >= 0x071500 /* Available since 7.21.0 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue