Merge pull request #1212 from franzliedke/patch-46
Fix CLI mode detection for some shared hosts.
This commit is contained in:
commit
cfc024fe66
|
@ -213,7 +213,7 @@
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (defined('STDIN'))
|
if (Request::cli())
|
||||||
{
|
{
|
||||||
$console = CLI\Command::options($_SERVER['argv']);
|
$console = CLI\Command::options($_SERVER['argv']);
|
||||||
|
|
||||||
|
|
|
@ -196,7 +196,7 @@ public static function time()
|
||||||
*/
|
*/
|
||||||
public static function cli()
|
public static function cli()
|
||||||
{
|
{
|
||||||
return defined('STDIN');
|
return defined('STDIN') || (substr(PHP_SAPI, 0, 3) == 'cgi' && getenv('TERM'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue