Browse Source

Do explicit check of local config file.

tags/2.0.0-beta
Qiang Xue 12 years ago
parent
commit
a16d3cd370
  1. 8
      apps/advanced/yii

8
apps/advanced/yii

@ -16,10 +16,10 @@ defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));
require(__DIR__ . '/vendor/yiisoft/yii2/yii/Yii.php');
require(__DIR__ . '/vendor/autoload.php');
$config = require(__DIR__ . 'console/config/main.php');
$localConfig = @include(__DIR__ . 'console/config/main-local.php');
if($localConfig!==false) {
$config = yii\helpers\ArrayHelper::merge($config, $localConfig);
$config = require(__DIR__ . '/console/config/main.php');
$localConfig = __DIR__ . '/console/config/main-local.php');
if (is_file($localeConfig)) {
$config = yii\helpers\ArrayHelper::merge($config, require($localConfig));
}
$application = new yii\console\Application($config);

Loading…
Cancel
Save