diff --git a/laravel/core.php b/laravel/core.php index 0f33ccfd..a2170611 100644 --- a/laravel/core.php +++ b/laravel/core.php @@ -213,7 +213,7 @@ if (isset($environment)) | */ -if (defined('STDIN')) +if (Request::cli()) { $console = CLI\Command::options($_SERVER['argv']); diff --git a/laravel/request.php b/laravel/request.php index 29340d71..0193776e 100644 --- a/laravel/request.php +++ b/laravel/request.php @@ -196,7 +196,7 @@ class Request { */ public static function cli() { - return defined('STDIN'); + return defined('STDIN') || (substr(PHP_SAPI, 0, 3) == 'cgi' && getenv('TERM')); } /**