Config: Fix cached loading of module config

Since the module copied the array to a local variable, the loaded
Config object never got saved to self::$modules
This commit is contained in:
Markus Frosch 2017-08-10 18:43:27 +02:00
parent 16f9fa35c9
commit 7da7c0f6c7
1 changed files with 3 additions and 4 deletions

View File

@ -416,13 +416,12 @@ class Config implements Countable, Iterator, Selectable
self::$modules[$modulename] = array();
}
$moduleConfigs = self::$modules[$modulename];
if (! isset($moduleConfigs[$configname]) || $fromDisk) {
$moduleConfigs[$configname] = static::fromIni(
if (! isset(self::$modules[$modulename][$configname]) || $fromDisk) {
self::$modules[$modulename][$configname] = static::fromIni(
static::resolvePath('modules/' . $modulename . '/' . $configname . '.ini')
);
}
return $moduleConfigs[$configname];
return self::$modules[$modulename][$configname];
}
/**