Skip to content

Commit 1badd3d

Browse files
Merge branch '4.4' into 5.4
* 4.4: [HttpClient] fix destructing CurlResponse
2 parents 1ed04ca + 60e0be5 commit 1badd3d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Response/CurlResponse.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,9 @@ public function __destruct()
255255

256256
$this->doDestruct();
257257
} finally {
258-
curl_setopt($this->handle, \CURLOPT_VERBOSE, false);
258+
if (\is_resource($this->handle) || $this->handle instanceof \CurlHandle) {
259+
curl_setopt($this->handle, \CURLOPT_VERBOSE, false);
260+
}
259261
}
260262
}
261263

0 commit comments

Comments
 (0)