zcrm-php-sdk icon indicating copy to clipboard operation
zcrm-php-sdk copied to clipboard

BUG Don't ignore curl errors

Open tractorcow opened this issue 5 years ago • 2 comments

Ignoring connection errors returned by curl_exec() can have unexpected consequences. This fix ensures that all errors are correctly reported.

tractorcow avatar May 19 '20 03:05 tractorcow

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

tractorcow avatar May 19 '20 03:05 tractorcow

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.

Tejes avatar Jul 22 '20 14:07 Tejes