Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6817109

Browse files
[VarDumper] Fix missing colors initialization in CliDumper
1 parent 840c5cc commit 6817109

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines 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)