mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-04 04:56:52 +00:00
Camelize key names from aio_variables from container specs
Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
parent
d252258e02
commit
d370448f4e
1 changed files with 6 additions and 0 deletions
|
|
@ -986,6 +986,11 @@ class ConfigurationManager
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private function camelize(string $input, string $delimiter = '_') : string {
|
||||
return lcfirst(implode("", array_map('ucfirst', explode($delimiter, strtolower($input)))));
|
||||
|
||||
}
|
||||
|
||||
public function setAioVariables(array $input) : void {
|
||||
if ($input === []) {
|
||||
|
|
@ -1001,6 +1006,7 @@ class ConfigurationManager
|
|||
// Pad the result with nulls so psalm is happy (and we don't risk to run into warnings in case
|
||||
// the check for an equal sign from above gets changed).
|
||||
[$key, $value] = explode('=', $keyWithValue, 2) + [null, null];
|
||||
$key = $this->camelize($key);
|
||||
if ($value === null) {
|
||||
error_log("Invalid input: '$keyWithValue' has no value after the equal sign");
|
||||
} else if (!property_exists($confManager, $key)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue