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 9e74afd

Browse filesBrowse files
committed
bug #53537 [VarDumper] Fix missing colors initialization in CliDumper (nicolas-grekas)
This PR was merged into the 5.4 branch. Discussion ---------- [VarDumper] Fix missing colors initialization in `CliDumper` | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | - | License | MIT Backporting #53521 to 5.4 Commits ------- 6817109 [VarDumper] Fix missing colors initialization in CliDumper
2 parents 840c5cc + 6817109 commit 9e74afd
Copy full SHA for 9e74afd

File tree

1 file changed

+4
-0
lines changed
Filter options

1 file changed

+4
-0
lines changed

‎src/Symfony/Component/VarDumper/Dumper/CliDumper.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/VarDumper/Dumper/CliDumper.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,10 @@ protected function supportsColors()
564564
*/
565565
protected function dumpLine(int $depth, bool $endOfValue = false)
566566
{
567+
if (null === $this->colors) {
568+
$this->colors = $this->supportsColors();
569+
}
570+
567571
if ($this->colors) {
568572
$this->line = sprintf("\033[%sm%s\033[m", $this->styles['default'], $this->line);
569573
}

0 commit comments

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