php-mod/curl

An issue with $curl->post and error handler

marekka opened this issue · 4 comments

Hi, I use:
$curl->post($curlUrl, $data2send);
if ($curl->error) {
///
}

BUt SENTRY is returning a bug:
Unhandled
Warning: curl_error(): supplied resource is not a valid cURL handle resource

ErrorException
Warning: curl_setopt(): supplied resource is not a valid cURL handle resource

What could it be?

nadar commented

hi @marekka

Could you post more of your code? Also sentry should return the exact line of where the error occours? What version of the library are you using?

Sorry - here:
/vendor/curl/curl/src/Curl/Curl.php in Curl\Curl::exec at line 214
curl_error(): supplied resource is not a valid cURL handle resource
protected function exec()
{
$this->response_headers = array();
$this->response = curl_exec($this->curl);
$this->curl_error_code = curl_errno($this->curl);
$this->curl_error_message = curl_error($this->curl);

nadar commented

ok, but can you please post more of your application code, so we can see what you do with the $curl object, i don't think its a problem of the library to be honest. Also which version are you using?

nadar commented

I am going to close this issue to maintain a clean issue tracker for the following reasons:

  1. Incomplete information (Are there any unanswered questions? Please provide as much information as possible).
  2. Lack of recent activity (No further replies).
  3. No one has taken up the task (no Pull Request has been received).

If you believe that this issue remains important or if you have additional or updated information, please consider reopening the issue and informing us.