Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.

Commit

Permalink
Fix cli detection in r class
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianallgeier committed Jun 20, 2017
1 parent da74e0e commit 3834f98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/r.php
Expand Up @@ -298,7 +298,8 @@ public static function ip() {
* @return boolean
*/
public static function cli() {
return defined('STDIN') || (substr(PHP_SAPI, 0, 3) == 'cgi' && $term = getenv('TERM') && $term !== 'unknown');
$term = getenv('TERM');
return defined('STDIN') || (substr(PHP_SAPI, 0, 3) == 'cgi' && $term !== 'unknown');
}

/**
Expand Down

0 comments on commit 3834f98

Please sign in to comment.