mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-04 04:56:52 +00:00
Check arguments to camelize() for usefulness
Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
parent
078f3caf8a
commit
ec66b359e0
1 changed files with 6 additions and 0 deletions
|
|
@ -934,6 +934,12 @@ class ConfigurationManager
|
|||
}
|
||||
|
||||
private function camelize(string $input, string $delimiter = '_') : string {
|
||||
if ($input === '') {
|
||||
throw new InvalidSettingConfigurationException('input cannot be empty!');
|
||||
}
|
||||
if ($delimiter === '') {
|
||||
$delimiter = '_';
|
||||
}
|
||||
return lcfirst(implode("", array_map('ucfirst', explode($delimiter, strtolower($input)))));
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue