X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2Fconfig%2FConfigManager.php;h=82f4a368e669d57316884a1deec581841813214f;hb=359696dcbb5073be82bb18f7b557b9ba0176d7c9;hp=7ff2fe671e94b8b6809044a31d17331c92320237;hpb=2f69b6d04e399bd3efae0f12b8ad8c148fabf350;p=github%2Fshaarli%2FShaarli.git diff --git a/application/config/ConfigManager.php b/application/config/ConfigManager.php index 7ff2fe67..82f4a368 100644 --- a/application/config/ConfigManager.php +++ b/application/config/ConfigManager.php @@ -123,7 +123,7 @@ class ConfigManager * Supports nested settings with dot separated keys. * * @param string $setting Asked setting, keys separated with dots. - * @param string $value Value to set. + * @param mixed $value Value to set. * @param bool $write Write the new setting in the config file, default false. * @param bool $isLoggedIn User login state, default false. * @@ -132,7 +132,7 @@ class ConfigManager public function set($setting, $value, $write = false, $isLoggedIn = false) { if (empty($setting) || ! is_string($setting)) { - throw new \Exception('Invalid setting key parameter. String expected, got: '. gettype($setting)); + throw new \Exception(t('Invalid setting key parameter. String expected, got: '). gettype($setting)); } // During the ConfigIO transition, map legacy settings to the new ones. @@ -339,6 +339,10 @@ class ConfigManager $this->setEmpty('redirector.url', ''); $this->setEmpty('redirector.encode_url', true); + $this->setEmpty('translation.language', 'auto'); + $this->setEmpty('translation.mode', 'php'); + $this->setEmpty('translation.extensions', []); + $this->setEmpty('plugins', array()); }