8000 [HttpClient] fix destructing CurlResponse · symfony/symfony@2094f4b · GitHub
[go: up one dir, main page]

Skip to content

Commit 2094f4b

Browse files
[HttpClient] fix destructing CurlResponse
1 parent 12b63b3 commit 2094f4b

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
@@ -233,7 +233,9 @@ public function __destruct()
233233

234234
$this->doDestruct();
235235
} finally {
236-
curl_setopt($this->handle, \CURLOPT_VERBOSE, false);
236+
if (\is_resource($this->handle) || $this->handle instanceof \CurlHandle) {
237+
curl_setopt($this->handle, \CURLOPT_VERBOSE, false);
238+
}
237239
}
238240
}
239241

0 commit comments

Comments
 (0)
0