Closed lowwa132 closed 6 years ago
In: https://github.com/lexik/LexikPayboxBundle/blob/master/Transport/CurlTransport.php#L63
if (!in_array($responseCode, array(0, 200, 201, 204))) { throw new \RuntimeException('cUrl returns some errors (cURL errno '.$curlErrorNumber.'): '.$curlErrorMessage.' (HTTP Code: '.$responseCode.')'); }
It doesn't throw an exception (even though curl_errno > 0) if you don't have a HTTP responseCode, like this one:
curl_errno > 0
var_dump($response, $curlErrorNumber, $curlErrorMessage, $responseCode)
boolean false int 60 string 'SSL certificate problem: unable to get local issuer certificate' (length=63) int 0
Possible fix:
if ($curlErrorNumber > 0 || !in_array($responseCode, array(0, 200, 201, 204))) { throw new \RuntimeException('cUrl returns some errors (cURL errno '.$curlErrorNumber.'): '.$curlErrorMessage.' (HTTP Code: '.$responseCode.')'); }
Hi, indeed it's better to also check the cURL error number, I've updated the code.
In: https://github.com/lexik/LexikPayboxBundle/blob/master/Transport/CurlTransport.php#L63
It doesn't throw an exception (even though
curl_errno > 0
) if you don't have a HTTP responseCode, like this one:var_dump($response, $curlErrorNumber, $curlErrorMessage, $responseCode)
Possible fix: