mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-16 02:30:17 +00:00
Check arguments to camelize() for usefulness
Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
parent
fec5bbc3c4
commit
f7cde3fb0a
1 changed files with 6 additions and 0 deletions
|
|
@ -934,6 +934,12 @@ class ConfigurationManager
|
||||||
}
|
}
|
||||||
|
|
||||||
private function camelize(string $input, string $delimiter = '_') : string {
|
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)))));
|
return lcfirst(implode("", array_map('ucfirst', explode($delimiter, strtolower($input)))));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue