8000 Merge branch '3.4' into 4.2 · symfony/symfony@ebe9ccf · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ebe9ccf

Browse files
Merge branch '3.4' into 4.2
* 3.4: Catch empty deprecation.log silently (fixes #31050)
2 parents 9399cb9 + 9483779 commit ebe9ccf

File tree

5 files changed

+9
-12
lines changed

5 files changed

+9
-12
lines changed
Lines changed: 1 addition & 4 deletions
Loading
Lines changed: 1 addition & 3 deletions
Loading
Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 1 addition & 3 deletions
Loading

src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,13 @@ private function getContainerDeprecationLogs()
127127
return [];
128128
}
129129

130+
if ('' === $logContent = trim(file_get_contents($file))) {
131+
return [];
132+
}
133+
130134
$bootTime = filemtime($file);
131135
$logs = [];
132-
foreach (unserialize(file_get_contents($file)) as $log) {
136+
foreach (unserialize($logContent) as $log) {
133137
$log['context'] = ['exception' => new SilencedErrorContext($log['type'], $log['file'], $log['line'], $log['trace'], $log['count'])];
134138
$log['timestamp'] = $bootTime;
135139
$log['priority'] = 100;

0 commit comments

Comments
 (0)
0