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

Skip to content

Commit b163c7a

Browse files
crynobonefabpot
authored andcommitted
[VarDumper] Fixes Typed property Symfony\Component\VarDumper\Dumper\CliDumper::$colors must not be accessed before initialization
1 parent e597a35 commit b163c7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ protected function supportsColors(): bool
550550

551551
protected function dumpLine(int $depth, bool $endOfValue = false): void
552552
{
553-
if ($this->colors) {
553+
if ($this->colors ??= $this->supportsColors()) {
554554
$this->line = sprintf("\033[%sm%s\033[m", $this->styles['default'], $this->line);
555555
}
556556
parent::dumpLine($depth);

0 commit comments

Comments
 (0)