From 94eb1f007061458b53660e96659a7e6399da7a2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radim=20Vaculi=CC=81k?= Date: Thu, 25 Jan 2024 11:36:33 +0100 Subject: [PATCH] Fix: Undefined constant "Nextras\Migrations\Printers\STDOUT" --- src/Printers/Console.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Printers/Console.php b/src/Printers/Console.php index 6b52c3b..08d6fd4 100644 --- a/src/Printers/Console.php +++ b/src/Printers/Console.php @@ -105,8 +105,8 @@ protected function colorize(string $s, ?string $color): string */ protected function detectColorSupport(): bool { - return (function_exists('posix_isatty') && posix_isatty(STDOUT)) - || (function_exists('stream_isatty') && stream_isatty(STDOUT)) - || (function_exists('sapi_windows_vt100_support') && sapi_windows_vt100_support(STDOUT)); + return (defined('STDOUT') && function_exists('posix_isatty') && posix_isatty(STDOUT)) + || (defined('STDOUT') && function_exists('stream_isatty') && stream_isatty(STDOUT)) + || (defined('STDOUT') && function_exists('sapi_windows_vt100_support') && sapi_windows_vt100_support(STDOUT)); } }