Skip to content

Commit b810a23

Browse files
iluuu1994bukka
authored andcommitted
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.
1 parent da75e41 commit b810a23

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/curl/interface.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2289,7 +2289,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue, bool i
22892289
lval = zval_get_long(zvalue);
22902290
if (lval == 1) {
22912291
php_error_docref(NULL, E_NOTICE, "CURLOPT_SSL_VERIFYHOST no longer accepts the value 1, value 2 will be used instead");
2292-
error = curl_easy_setopt(ch->cp, option, 2);
2292+
error = curl_easy_setopt(ch->cp, option, 2L);
22932293
break;
22942294
}
22952295
ZEND_FALLTHROUGH;
@@ -2789,7 +2789,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue, bool i
27892789

27902790
case CURLOPT_FOLLOWLOCATION:
27912791
lval = zend_is_true(zvalue);
2792-
error = curl_easy_setopt(ch->cp, option, lval);
2792+
error = curl_easy_setopt(ch->cp, option, (long) lval);
27932793
break;
27942794

27952795
case CURLOPT_HEADERFUNCTION:

0 commit comments

Comments
 (0)