Skip to content

Commit 67e415d

Browse files
committed
Log curl errors
1 parent 0b50277 commit 67e415d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Client.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,12 @@ private function sendRequest()
300300
curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, false);
301301
}
302302
$this->curl_result = curl_exec($this->ch);
303+
if ($this->curl_result === false) {
304+
$this->log(
305+
"cURL error: " . curl_errno($this->ch) .
306+
" msg: " . curl_error($this->ch)
307+
);
308+
}
303309
$this->status = curl_getinfo($this->ch, CURLINFO_HTTP_CODE);
304310
}
305311

0 commit comments

Comments
 (0)