From b810a235870f7fbb377fa50470970eaf16d796ce Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Tue, 23 Sep 2025 14:14:09 +0200 Subject: [PATCH] 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. --- ext/curl/interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/curl/interface.c b/ext/curl/interface.c index f8f0d1cec35..c56a1b01f2f 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -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: