Commit 8c6cf615 by Benjamin Wöster

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

parent 612eb3fd
...@@ -85,8 +85,12 @@ class Application extends Module ...@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment