Merge pull request #32957 from nextcloud/fix/import-float

Fix importing float value
This commit is contained in:
Carl Schwan 2022-06-23 17:39:45 +02:00 committed by GitHub
commit 253ae64faf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -169,8 +169,8 @@ class Import extends Command implements CompletionAwareInterface {
* @param string $configName
*/
protected function checkTypeRecursively($configValue, $configName) {
if (!is_array($configValue) && !is_bool($configValue) && !is_int($configValue) && !is_string($configValue) && !is_null($configValue)) {
throw new \UnexpectedValueException('Invalid system config value for "' . $configName . '". Only arrays, bools, integers, strings and null (delete) are allowed.');
if (!is_array($configValue) && !is_bool($configValue) && !is_int($configValue) && !is_string($configValue) && !is_null($configValue) && !is_float($configValue)) {
throw new \UnexpectedValueException('Invalid system config value for "' . $configName . '". Only arrays, bools, integers, floats, strings and null (delete) are allowed.');
}
if (is_array($configValue)) {
foreach ($configValue as $key => $value) {