diff --git a/system/Common.php b/system/Common.php index a79bd57aebc9..f975ab3afa06 100644 --- a/system/Common.php +++ b/system/Common.php @@ -763,7 +763,7 @@ function is_cli(): bool return true; } - if (! isset($_SERVER['REMOTE_ADDR'], $_SERVER['HTTP_USER_AGENT'])) + if (! isset($_SERVER['REMOTE_ADDR'], $_SERVER['HTTP_USER_AGENT']) && isset($_SERVER['argv']) && count($_SERVER['argv']) > 0) { return true; }