Skip to content

Commit 643fa65

Browse files
Merge branch '4.4' into 5.4
* 4.4: [HttpClient] fix destructing CurlResponse
2 parents e0b5ce1 + 2094f4b commit 643fa65

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Symfony/Component/HttpClient/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)