Update Curl.php

This commit is contained in:
Oxicode
2016-06-01 18:22:34 -05:00
parent 1e100063a3
commit 9006dbf3a0
+1
View File
@@ -347,6 +347,7 @@ class Curl
$this->curlErrorMessage = curl_error($this->curl);
$this->curlError = !($this->curlErrorCode === 0);
$this->httpStatusCode = curl_getinfo($this->curl, CURLINFO_HTTP_CODE);
$this->totalTime = curl_getinfo($this->curl, CURLINFO_TOTAL_TIME);
$this->httpError = in_array(floor($this->httpStatusCode / 100), array(4, 5));
$this->error = $this->curlError || $this->httpError;
$this->errorCode = $this->error ? ($this->curlError ? $this->curlErrorCode : $this->httpStatusCode) : 0;