OK, found the root cause. The config.php contained a spurious 0 => 'NANphp',. When checking the presence of the redis.cluster property in the config, the in_array function can return true when the config contains a 0 property as (int)'redis.cluster' === 0.

https://github.com/nextcloud/server/pull/29906 is the upstream PR.

Solution: remove the spurious 0 => 'NANphp', in config.php using the file manager .