X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2Fconfig%2FConfigPhp.php;h=8add8bcd776009e1cff804f3b8f47e5417ff4c6f;hb=cb4ddbe4e76c81a50748fc3869225f16d9ce13f0;hp=2633824d3197f209d3048f74949d95b96d128148;hpb=236239be752a7bb24547237b5751ac4fcbc0e549;p=github%2Fshaarli%2FShaarli.git diff --git a/application/config/ConfigPhp.php b/application/config/ConfigPhp.php index 2633824d..8add8bcd 100644 --- a/application/config/ConfigPhp.php +++ b/application/config/ConfigPhp.php @@ -83,10 +83,10 @@ class ConfigPhp implements ConfigIO $out = array(); foreach (self::$ROOT_KEYS as $key) { - $out[$key] = $GLOBALS[$key]; + $out[$key] = isset($GLOBALS[$key]) ? $GLOBALS[$key] : ''; } - $out['config'] = $GLOBALS['config']; - $out['plugins'] = !empty($GLOBALS['plugins']) ? $GLOBALS['plugins'] : array(); + $out['config'] = isset($GLOBALS['config']) ? $GLOBALS['config'] : []; + $out['plugins'] = isset($GLOBALS['plugins']) ? $GLOBALS['plugins'] : []; return $out; } @@ -118,8 +118,8 @@ class ConfigPhp implements ConfigIO ) { throw new \IOException( $filepath, - 'Shaarli could not create the config file. - Please make sure Shaarli has the right to write in the folder is it installed in.' + t('Shaarli could not create the config file. '. + 'Please make sure Shaarli has the right to write in the folder is it installed in.') ); } }