Skip to content

Commit 4abe41d

Browse files
[HttpClient] fix undefined index access
1 parent b373aff commit 4abe41d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DataCollector/HttpClientDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ private function collectOnClient(TraceableHttpClient $client): array
113113
}
114114

115115
$info = $trace['info'];
116-
$traces[$i]['http_code'] = $info['http_code'];
116+
$traces[$i]['http_code'] = $info['http_code'] ?? 0;
117117

118118
unset($info['filetime'], $info['http_code'], $info['ssl_verify_result'], $info['content_type']);
119119

0 commit comments

Comments
 (0)