From ccd8182038d5a58e6d8f0eb6b3921ebb66baeed0 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 2 Aug 2021 16:58:59 +0200 Subject: [PATCH] fix #116: cookies fail with libcurl >= 7.77 --- src/php_http_client_curl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/php_http_client_curl.c b/src/php_http_client_curl.c index 89ae5e0..0e79f19 100644 --- a/src/php_http_client_curl.c +++ b/src/php_http_client_curl.c @@ -856,7 +856,7 @@ static ZEND_RESULT_CODE php_http_curle_option_set_cookiestore(php_http_option_t } else { storage->cookiestore = NULL; } - if ( CURLE_OK != curl_easy_setopt(ch, CURLOPT_COOKIEFILE, storage->cookiestore) + if ( CURLE_OK != curl_easy_setopt(ch, CURLOPT_COOKIEFILE, storage->cookiestore ? storage->cookiestore : "") || CURLE_OK != curl_easy_setopt(ch, CURLOPT_COOKIEJAR, storage->cookiestore) ) { return FAILURE; -- 2.30.2