From a60709a354593eb30ac8812482df9d5ef3a34ce2 Mon Sep 17 00:00:00 2001 From: Romain Quetiez Date: Thu, 25 Nov 2010 09:44:42 +0000 Subject: [PATCH] #331 Import.php could not be run in HTTP mode (when PHP running in CGI mode) SVN:trunk[973] --- application/utils.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/utils.inc.php b/application/utils.inc.php index 23eb1085c8..2778b66bc5 100644 --- a/application/utils.inc.php +++ b/application/utils.inc.php @@ -45,8 +45,8 @@ class utils public static function IsModeCLI() { - global $argv; - if (isset($argv)) + $sSAPIName = php_sapi_name(); + if ($sSAPIName == 'cli') { return true; }