mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-24 17:39:05 +00:00
Fix floor() returning float instead of integer
This commit is contained in:
+1
-1
@@ -491,7 +491,7 @@ class Curl
|
||||
}
|
||||
|
||||
$this->httpStatusCode = $this->getInfo(CURLINFO_HTTP_CODE);
|
||||
$this->httpError = in_array(floor($this->httpStatusCode / 100), [4, 5], true);
|
||||
$this->httpError = in_array((int) floor($this->httpStatusCode / 100), [4, 5], true);
|
||||
$this->error = $this->curlError || $this->httpError;
|
||||
$this->errorCode = $this->error ? ($this->curlError ? $this->curlErrorCode : $this->httpStatusCode) : 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user