From 8c6cf6158932160f668deace507715311e64bf13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20W=C3=B6ster?= Date: Sat, 11 May 2013 03:28:05 +0200 Subject: [PATCH] mod: don't use ArrayHelper to avoid loading another class during every request --- yii/base/Application.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/yii/base/Application.php b/yii/base/Application.php index 2cea627..0eed31b 100644 --- a/yii/base/Application.php +++ b/yii/base/Application.php @@ -85,9 +85,13 @@ class Application extends Module throw new InvalidConfigException('The "basePath" configuration is required.'); } - if (isset($config['timeZone']) || !ini_get('date.timezone')) { - $this->setTimeZone( \yii\helpers\ArrayHelper::remove($config,'timeZone','UTC') ); - } + if (isset($config['timeZone'])) { + $this->setTimeZone($config['timeZone']); + unset($config['timeZone']); + } elseif (!ini_get('date.timezone')) { + $this->setTimeZone('UTC'); + unset($config['timeZone']); + } $this->registerErrorHandlers(); $this->registerCoreComponents();