diff --git a/lib/private/Setup.php b/lib/private/Setup.php index 05a55a149fa2e..ba7c655453536 100644 --- a/lib/private/Setup.php +++ b/lib/private/Setup.php @@ -372,8 +372,8 @@ public function install(array $options, ?IOutput $output = null): array { $dbType = 'sqlite3'; } - $salt = $options['passwordsalt'] ?: $this->random->generate(self::MIN_PASSWORD_SALT_LENGTH); - $secret = $options['secret'] ?: $this->random->generate(self::MIN_SECRET_LENGTH); + $salt = !empty($options['passwordsalt']) ? $options['passwordsalt'] : $this->random->generate(self::MIN_PASSWORD_SALT_LENGTH); + $secret = !empty($options['secret']) ? $options['secret'] : $this->random->generate(self::MIN_SECRET_LENGTH); //write the config file $newConfigValues = [