- Removed curl_close() as it is deprecated
This commit is contained in:
parent
0694b50eb6
commit
2df4ea15e2
@ -31,8 +31,6 @@ class Curl implements TransportInterface {
|
||||
if ($this->throwErrors) {
|
||||
if ( false === $exec) {
|
||||
$errno = curl_errno($ch);
|
||||
curl_close($ch);
|
||||
|
||||
throw new CurlException(implode(PHP_EOL, array_filter([ curl_error($ch) , static::CURL_ERROR[$errno] ?? null ])), $errno);
|
||||
}
|
||||
elseif ($code >= 400) {
|
||||
@ -40,8 +38,6 @@ class Curl implements TransportInterface {
|
||||
}
|
||||
}
|
||||
|
||||
curl_close($ch);
|
||||
|
||||
return $exec;
|
||||
}
|
||||
|
||||
@ -59,12 +55,8 @@ class Curl implements TransportInterface {
|
||||
if ( ( false === $execute ) && $this->throwErrors ) {
|
||||
$errno = curl_errno($ch);
|
||||
|
||||
curl_close($ch);
|
||||
throw new CurlException(implode(PHP_EOL, array_filter([ curl_error($ch) , static::CURL_ERROR[$errno] ?? null ])), $errno);
|
||||
}
|
||||
else {
|
||||
curl_close($ch);
|
||||
}
|
||||
|
||||
return $execute ? (object) $execute : null;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user