mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-17 06:48:59 +08:00
"YiiRequirementChecker" fixed to determine console mode more precisely.
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user