Browse Source

mod: don't use ArrayHelper to avoid loading another class during every request

tags/2.0.0-beta
Benjamin Wöster 12 years ago
parent
commit
8c6cf61589
  1. 8
      yii/base/Application.php

8
yii/base/Application.php

@ -85,8 +85,12 @@ class Application extends Module
throw new InvalidConfigException('The "basePath" configuration is required.'); throw new InvalidConfigException('The "basePath" configuration is required.');
} }
if (isset($config['timeZone']) || !ini_get('date.timezone')) { if (isset($config['timeZone'])) {
$this->setTimeZone( \yii\helpers\ArrayHelper::remove($config,'timeZone','UTC') ); $this->setTimeZone($config['timeZone']);
unset($config['timeZone']);
} elseif (!ini_get('date.timezone')) {
$this->setTimeZone('UTC');
unset($config['timeZone']);
} }
$this->registerErrorHandlers(); $this->registerErrorHandlers();

Loading…
Cancel
Save