From ff386fc4623e829ff7f118fc437b08cb432ac690 Mon Sep 17 00:00:00 2001 From: Paul Klimov Date: Tue, 21 May 2013 11:28:08 +0300 Subject: [PATCH] "YiiRequirementChecker" fixed to determine console mode more precisely. --- yii/requirements/YiiRequirementChecker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yii/requirements/YiiRequirementChecker.php b/yii/requirements/YiiRequirementChecker.php index 646d0d2..f32dcd7 100644 --- a/yii/requirements/YiiRequirementChecker.php +++ b/yii/requirements/YiiRequirementChecker.php @@ -154,7 +154,7 @@ class YiiRequirementChecker $this->usageError('Nothing to render!'); } $baseViewFilePath = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'views'; - if (array_key_exists('argv', $_SERVER)) { + if (array_key_exists('argv', $_SERVER) && !empty($_SERVER['argv'])) { $viewFileName = $baseViewFilePath . DIRECTORY_SEPARATOR . 'console' . DIRECTORY_SEPARATOR . 'index.php'; } else { $viewFileName = $baseViewFilePath . DIRECTORY_SEPARATOR . 'web' . DIRECTORY_SEPARATOR . 'index.php';