Skip to content

Commit cfc024f

Browse files
committed
Merge pull request laravel#1212 from franzliedke/patch-46
Fix CLI mode detection for some shared hosts.
2 parents c397c26 + b1e4cf9 commit cfc024f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

laravel/core.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@
213213
|
214214
*/
215215

216-
if (defined('STDIN'))
216+
if (Request::cli())
217217
{
218218
$console = CLI\Command::options($_SERVER['argv']);
219219

laravel/request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public static function time()
196196
*/
197197
public static function cli()
198198
{
199-
return defined('STDIN');
199+
return defined('STDIN') || (substr(PHP_SAPI, 0, 3) == 'cgi' && getenv('TERM'));
200200
}
201201

202202
/**

0 commit comments

Comments
 (0)