Skip to content

Commit

Permalink
[PhpUnitBridge][Console][VarDumper] Fix handling NO_COLOR env var
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Aug 13, 2024
1 parent cef6239 commit f96ee2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Output/StreamOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ protected function doWrite(string $message, bool $newline)
protected function hasColorSupport()
{
// Follow https://no-color.org/
if ('' !== ($_SERVER['NO_COLOR'] ?? getenv('NO_COLOR') ?: '')) {
if ('' !== (($_SERVER['NO_COLOR'] ?? getenv('NO_COLOR'))[0] ?? '')) {
return false;
}

Expand Down

0 comments on commit f96ee2a

Please sign in to comment.