diff --git a/apps/files/lib/Service/UserConfig.php b/apps/files/lib/Service/UserConfig.php index f2ad1db02d7..372b1c81595 100644 --- a/apps/files/lib/Service/UserConfig.php +++ b/apps/files/lib/Service/UserConfig.php @@ -159,6 +159,8 @@ class UserConfig { if ((int)$value < $config['min'] || (int)$value > $config['max']) { throw new \InvalidArgumentException('Invalid config value'); } + } elseif (isset($config['min']) || isset($config['max'])) { + throw new \InvalidArgumentException('Invalid config definition: min and max must both be defined'); } elseif (!in_array($value, $this->getAllowedConfigValues($key))) { throw new \InvalidArgumentException('Invalid config value'); }