cURL version 7.56.1 causes HTTP client exception in Twilio PHP Helper Library 5.15.4 and lower

For systems upgraded to cURL version 7.56.1 and running Twilio PHP Helper Library 5.15.4 or lower, you may encounter a generic exception in the underlying cURL HTTP client.

Error Details

4.x or lower

Fatal error: Uncaught exception 'Services_Twilio_TinyHttpException' in /Services/Twilio/TinyHttp.php:94

or

CURLE_BAD_FUNCTION_ARGUMENT (43)
Internal error. A function was called with a bad parameter.

5.x

PHP Fatal error: Uncaught exception 'Twilio\Exceptions\EnvironmentException' in /vendor/twilio/sdk/Twilio/Http/CurlClient.php:37

Regardless of the version, the stack trace will reference curl_setopt_array.

Resolution

To resolve in the 5.x helper library, simply upgrade to 5.15.5 or greater. For the 4.x library, upgrade to 4.12.1.

You can also just remove the following line, or change the value to null.

From:

CURLOPT_INFILESIZE => -1

To:

CURLOPT_INFILESIZE => NULL
Have more questions? Submit a request
Powered by Zendesk