Skip to content
Extraits de code Groupes Projets
Valider 97d70bf0 rédigé par Thomas Steur's avatar Thomas Steur
Parcourir les fichiers

fix saving config does not work, we need to remove a reference

BTW: The method name Config::forceSave is kinda wrong as it does not
force anything, it saves only if there is a change
parent c9e7e3fd
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -222,7 +222,23 @@ class IniFileChain ...@@ -222,7 +222,23 @@ class IniFileChain
} }
} }
$this->mergedSettings = $this->mergeFileSettings(); $merged = $this->mergeFileSettings();
// remove reference to $this->settingsChain... otherwise dump() or compareElements() will never notice a difference
// on PHP 7+ as they would be always equal
$this->mergedSettings = $this->copy($merged);
}
private function copy($merged)
{
$copy = array();
foreach ($merged as $index => $value) {
if (is_array($value)) {
$copy[$index] = $this->copy($value);
} else {
$copy[$index] = $value;
}
}
return $copy;
} }
private function resetSettingsChain($defaultSettingsFiles, $userSettingsFile) private function resetSettingsChain($defaultSettingsFiles, $userSettingsFile)
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter