Skip to content

Commit 21857a1

Browse files
[HttpClient] fix closing debug stream prematurely
1 parent c45c6e5 commit 21857a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/HttpClient/Response/CurlResponse.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ public function getInfo(string $type = null)
168168
rewind($this->debugBuffer);
169169
$info['debug'] = stream_get_contents($this->debugBuffer);
170170
curl_setopt($this->handle, CURLOPT_VERBOSE, false);
171-
fclose($this->debugBuffer);
172-
$this->debugBuffer = null;
171+
rewind($this->debugBuffer);
172+
ftruncate($this->debugBuffer, 0);
173173
$this->finalInfo = $info;
174174
}
175175
}

0 commit comments

Comments
 (0)