mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Fix more curl 8.16 issues
The CURLOPT_FOLLOWLOCATION seems like a gcc bug, where the integer extension of bool to long is lost, but I was unable to reproduce on godbolt.org.
This commit is contained in:
committed by
Jakub Zelenka
parent
da75e41a6f
commit
b810a23587
@@ -2289,7 +2289,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue, bool i
|
||||
lval = zval_get_long(zvalue);
|
||||
if (lval == 1) {
|
||||
php_error_docref(NULL, E_NOTICE, "CURLOPT_SSL_VERIFYHOST no longer accepts the value 1, value 2 will be used instead");
|
||||
error = curl_easy_setopt(ch->cp, option, 2);
|
||||
error = curl_easy_setopt(ch->cp, option, 2L);
|
||||
break;
|
||||
}
|
||||
ZEND_FALLTHROUGH;
|
||||
@@ -2789,7 +2789,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue, bool i
|
||||
|
||||
case CURLOPT_FOLLOWLOCATION:
|
||||
lval = zend_is_true(zvalue);
|
||||
error = curl_easy_setopt(ch->cp, option, lval);
|
||||
error = curl_easy_setopt(ch->cp, option, (long) lval);
|
||||
break;
|
||||
|
||||
case CURLOPT_HEADERFUNCTION:
|
||||
|
||||
Reference in New Issue
Block a user