Config::set(): fix setting value in inexisting section

This commit is contained in:
Benjamin Renard 2023-03-03 10:34:17 +01:00
parent 8e5b0b0b2c
commit 97f91156de
Signed by: bn8
GPG key ID: 3E2E1CE1907115BC

View file

@ -224,7 +224,7 @@ Class Config {
} }
for ($i=0; $i < count($exploded_key) - 1; $i++) { for ($i=0; $i < count($exploded_key) - 1; $i++) {
$k = $exploded_key[$i]; $k = $exploded_key[$i];
if (!array_key_exists($k, $config)) if (!array_key_exists($k, $parent))
$parent[$k] = array(); $parent[$k] = array();
$parent = &$parent[$k]; $parent = &$parent[$k];
} }