Framework: Fix typo in DateTimeFactory::setConfig

refs #4440
This commit is contained in:
Eric Lippmann 2013-08-12 11:21:30 +02:00
parent b4b51b9d46
commit e95c604084
2 changed files with 5 additions and 5 deletions

View File

@ -348,13 +348,13 @@ abstract class ApplicationBootstrap
*/
protected function setupTimezone()
{
$tz = $this->config->global->get('timezone', 'UTC');
$timeZoneString = $this->config->global->get('timezone', 'UTC');
try {
$tz = new DateTimeZone($tz);
$tz = new DateTimeZone($timeZoneString);
} catch (Exception $e) {
throw new ConfigurationError(t('Invalid timezone') . ' "' . $tz . '"');
throw new ConfigurationError(t('Invalid timezone') . ' "' . $timeZoneString . '"');
}
date_default_timezone_set($tz);
date_default_timezone_set($timeZoneString);
DateTimeFactory::setConfig(array('timezone' => $tz));
return $this;
}

View File

@ -23,7 +23,7 @@ class DateTimeFactory implements ConfigAwareFactory
*/
public static function setConfig($config)
{
if (!array_key_exists('timezome', $config)) {
if (!array_key_exists('timezone', $config)) {
throw new ConfigurationError(t('"DateTimeFactory" expects a valid time zone to be set via "setConfig"'));
}
self::$timeZone = $config['timezone'];