Skip to content

Commit bce6f33

Browse files
committed
Merge branch '3.4' into 4.4
* 3.4: Fix wrong namespaces [Validator] Fixed calling getters before resolving groups [HttpKernel][LoggerDataCollector] Prevent keys collisions in the sanitized logs processing
2 parents aeaa783 + e8eeb67 commit bce6f33

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

DataCollector/LoggerDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ private function sanitizeLogs(array $logs)
179179
continue;
180180
}
181181

182-
$message = $log['message'];
182+
$message = '_'.$log['message'];
183183
$exception = $log['context']['exception'];
184184

185185
if ($exception instanceof SilencedErrorContext) {

Tests/DataCollector/LoggerDataCollectorTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,15 @@ public function getCollectTestData()
176176
[
177177
['message' => 'foo3', 'context' => ['exception' => new \ErrorException('warning', 0, E_USER_WARNING)], 'priority' => 100, 'priorityName' => 'DEBUG'],
178178
['message' => 'foo3', 'context' => ['exception' => new SilencedErrorContext(E_USER_WARNING, __FILE__, __LINE__)], 'priority' => 100, 'priorityName' => 'DEBUG'],
179+
['message' => '0', 'context' => ['exception' => new SilencedErrorContext(E_USER_WARNING, __FILE__, __LINE__)], 'priority' => 100, 'priorityName' => 'DEBUG'],
179180
],
180181
[
181182
['message' => 'foo3', 'context' => ['exception' => ['warning', E_USER_WARNING]], 'priority' => 100, 'priorityName' => 'DEBUG'],
182183
['message' => 'foo3', 'context' => ['exception' => [E_USER_WARNING]], 'priority' => 100, 'priorityName' => 'DEBUG', 'errorCount' => 1, 'scream' => true],
184+
['message' => '0', 'context' => ['exception' => [E_USER_WARNING]], 'priority' => 100, 'priorityName' => 'DEBUG', 'errorCount' => 1, 'scream' => true],
183185
],
184186
0,
185-
1,
187+
2,
186188
];
187189
}
188190
}

0 commit comments

Comments
 (0)