Stop automatically creating camel case versions of top level configuration keys

This would cause issues with repeaters in grouped mode that have an underscore in one of the groups as it would duplicate that group entry.
This commit is contained in:
Luke Towers 2019-03-18 14:08:47 -06:00
parent 3954704dda
commit 639339d55e
1 changed files with 3 additions and 4 deletions

View File

@ -100,8 +100,8 @@ trait ConfigMaker
}
/**
* Makes a config object from an array, making the first level keys properties a new object.
* Property values are converted to camelCase and are not set if one already exists.
* Makes a config object from an array, making the first level keys properties of a new object.
*
* @param array $configArray Config array.
* @return stdClass The config object
*/
@ -114,8 +114,7 @@ trait ConfigMaker
}
foreach ($configArray as $name => $value) {
$_name = camel_case($name);
$object->{$name} = $object->{$_name} = $value;
$object->{$name} = $value;
}
return $object;