Fix CLI mode detection for some shared hosts.

This commit is contained in:
Franz Liedke
2012-09-12 14:56:46 +03:00
parent 38562d5007
commit d051994e2c

View File

@@ -196,7 +196,7 @@ class Request {
*/ */
public static function cli() public static function cli()
{ {
return defined('STDIN'); return defined('STDIN') || (substr(PHP_SAPI, 0, 3) == 'cgi' && getenv('TERM'));
} }
/** /**