From f96ee2a1098d49efe0df54f47474a6398c04869c Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 13 Aug 2024 15:55:12 +0200 Subject: [PATCH] [PhpUnitBridge][Console][VarDumper] Fix handling NO_COLOR env var --- Output/StreamOutput.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Output/StreamOutput.php b/Output/StreamOutput.php index 72479f8a2..b53955269 100644 --- a/Output/StreamOutput.php +++ b/Output/StreamOutput.php @@ -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; }