php-JiraCloud-RESTAPI icon indicating copy to clipboard operation
php-JiraCloud-RESTAPI copied to clipboard

Bugfix: Empty Encoding causes Write Error

Open zanbaldwin opened this issue 1 year ago • 0 comments

Passing an empty string for the cURL option CURLOPT_ENCODING causes a write error due to a 0-length write in the underlying libcurl, starting in PHP 8.3.7.

This has been fixed in cURL and, if I understand correctly, the appropriate fix will be to use the following:

curl_setopt($ch, CURLOPT_ACCEPT_ENCODING, '');

Unfortunately that has not landed in PHP yet and as of PHP 8.3.8 still causes the error. So for now, I've just restricted auto-detection of encoding to PHP versions below 8.3.7.

zanbaldwin avatar Jul 05 '24 09:07 zanbaldwin