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 c58f77f

Browse filesBrowse files
committed
bug #47238 [HttpKernel] Fix passing null to \trim() method in LoggerDataCollector (SVillette)
This PR was squashed before being merged into the 5.4 branch. Discussion ---------- [HttpKernel] Fix passing `null` to `\trim()` method in LoggerDataCollector | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #47235 | License | MIT | Doc PR | - The full explanation of the bug context is described in the [reproducer](https://github.com/SVillette/SymfonyTrimDeprecationReproducer) repository To be short, the fact of logging deprecations in dev environment and accessing the deprecations panel in the profiler triggered a PHP deprecation because the `\trim()` method was called with `null`. Commits ------- b2fea03 [HttpKernel] Fix passing `null` to `\trim()` method in LoggerDataCollector
2 parents 09b8854 + b2fea03 commit c58f77f
Copy full SHA for c58f77f

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public function getFilters()
144144

145145
$allChannels = [];
146146
foreach ($this->getProcessedLogs() as $log) {
147-
if ('' === trim($log['channel'])) {
147+
if ('' === trim($log['channel'] ?? '')) {
148148
continue;
149149
}
150150

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.