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.
4.x or lower
Fatal error: Uncaught exception 'Services_Twilio_TinyHttpException' in /Services/Twilio/TinyHttp.php:94
Internal error. A function was called with a bad parameter.
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
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.
CURLOPT_INFILESIZE => -1
CURLOPT_INFILESIZE => NULL