CiviMRF / CMRF_Abstract_Core

Abstract implementation for the the CMRF Core. Should be included into the concrete module implementation
GNU Affero General Public License v3.0
1 stars 4 forks source link

Fail the CMRF call if no response could be retrieved #21

Closed jensschuppe closed 9 months ago

jensschuppe commented 9 months ago

If curl_exec() fails without an error message (curl_error() still returning the empty string, but curl_exec() returning FALSE), do not try to json_decode() the response, as this crashes the application.

Failing to execute the cURL request should result in a Call::STATUS_FAILED.

Can someone explain which scenarios might lead to this behavior? I saw a cURL error code 77, but maybe there's more to cater for …

jaapjansma commented 9 months ago

Looks good! Nice addition during debugging I sometimes changed those lines of code to this.