From 834022de1904d265e44760d25a08b288ea05a5c8 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Printers/Console.php b/src/Printers/Console.php index 6b52c3b..45f9147 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)) + return defined('STDOUT') && ((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)); + || (function_exists('sapi_windows_vt100_support') && sapi_windows_vt100_support(STDOUT))); } }