From 6249ac6b2afdb1393a0dfd55c03faee20ae2af33 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Tue, 26 Mar 2024 12:07:45 +0100 Subject: [PATCH] Misc/Fixup * STDOUT is only defined if php is in run in cli mode --- includes/kernel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/kernel.php b/includes/kernel.php index 82b8e5ae..ed74f5a2 100644 --- a/includes/kernel.php +++ b/includes/kernel.php @@ -16,7 +16,7 @@ mb_internal_encoding('UTF-8'); define('OS_WIN', substr(PHP_OS, 0, 3) == 'WIN'); // WIN10 and later usually support ANSI escape sequences -define('CLI_HAS_E', !OS_WIN || (function_exists('sapi_windows_vt100_support') && sapi_windows_vt100_support(STDOUT))); +define('CLI_HAS_E', CLI && (!OS_WIN || (function_exists('sapi_windows_vt100_support') && sapi_windows_vt100_support(STDOUT)))); require_once 'includes/defines.php';