bug #34404 [HttpClient] fix HttpClientDataCollector (nicolas-grekas)

This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix HttpClientDataCollector

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #34365
| License       | MIT
| Doc PR        | -

Commits
-------

f51adc53f8 [HttpClient] fix HttpClientDataCollector
This commit is contained in:
Nicolas Grekas 2019-11-16 09:50:26 +01:00
commit 114a4b86ac
1 changed files with 1 additions and 0 deletions

View File

@ -135,6 +135,7 @@ final class HttpClientDataCollector extends DataCollector
$debugInfo = array_diff_key($info, $baseInfo);
$info = array_diff_key($info, $debugInfo) + ['debug_info' => $debugInfo];
unset($traces[$i]['info']); // break PHP reference used by TraceableHttpClient
$traces[$i]['info'] = $this->cloneVar($info);
$traces[$i]['options'] = $this->cloneVar($trace['options']);
}