Skip to content

Commit 04784c6

Browse files
committed
[HttpClient] Fix TraceableResponse if response has no destruct method
1 parent 19d48ef commit 04784c6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Response/TraceableResponse.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ public function __wakeup()
5757
public function __destruct()
5858
{
5959
try {
60-
$this->response->__destruct();
60+
if (method_exists($this->response, '__destruct')) {
61+
$this->response->__destruct();
62+
}
6163
} finally {
6264
if ($this->event && $this->event->isStarted()) {
6365
$this->event->stop();

0 commit comments

Comments
 (0)