mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-05-28 06:20:14 +00:00
Check arguments to camelize() for usefulness
Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
@@ -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)))));
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user