From cef62396a0477e94fc52e87a17c6e5c32e226b7f Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Wed, 24 Jul 2024 10:06:13 +0200 Subject: [PATCH] [Console][PhpUnitBridge][VarDumper] Fix `NO_COLOR` empty value handling --- Output/StreamOutput.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Output/StreamOutput.php b/Output/StreamOutput.php index 5f5ffce32..72479f8a2 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 (isset($_SERVER['NO_COLOR']) || false !== getenv('NO_COLOR')) { + if ('' !== ($_SERVER['NO_COLOR'] ?? getenv('NO_COLOR') ?: '')) { return false; }