Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4beb320

Browse files
weaverryannicolas-grekas
authored andcommitted
[HttpClient] "debug" is missing if a request failed to even start
1 parent 8a26600 commit 4beb320

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Symfony/Component/HttpClient/DataCollector/HttpClientDataCollector.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,10 @@ private function collectOnClient(TraceableHttpClient $client): array
171171

172172
private function getCurlCommand(array $trace): ?string
173173
{
174+
if (!isset($trace['info']['debug'])) {
175+
return null;
176+
}
177+
174178
$debug = explode("\n", $trace['info']['debug']);
175179
$url = $trace['url'];
176180
$command = ['curl', '--compressed'];

0 commit comments

Comments
 (0)