zcrm-php-sdk
zcrm-php-sdk copied to clipboard
BUG Don't ignore curl errors
Ignoring connection errors returned by curl_exec() can have unexpected consequences. This fix ensures that all errors are correctly reported.
Sorry there was a lot of trailing whitespace in the source file.
https://github.com/zoho/zcrm-php-sdk/pull/55/files?diff=unified&w=1
This is something that bothered me as well. Although I would store curl_error and curl_errno in a variable, call curl_close and then throw, because this way the code leaks. That can be a problem in a continuously running job. Also it would be nice to make the same modifications in src/oauth/utility/ZohoOAuthHTTPConnector.php as well.