Closed
Description
Hi,
I don't understand why appending null to the argument list when there is only one item?
A simple FLUSHALL
command fails due to the error.
Code:
$redis = new \Redis()
$redis->rawCommand('FLUSHALL');
Result:
OK
Code:
$clientFacade = new \MacFJA\RediSearch\Redis\Client\ClientFacade();
$client = $clientFacade->getClient($redis = new \Redis());
$client->executeRaw('FLUSHALL');
Result:
ErrorException
Redis::rawcommand(): Raw command arguments must be scalar values!
at vendor/macfja/redisearch/src/Redis/Client/PhpredisClient.php:81
77▕ if (count($args) < 2) {
78▕ $args[] = null;
79▕ }
80▕ // @phpstan-ignore-next-line
➜ 81▕ return $this->redis->rawCommand(...$args);
82▕ }
83▕
84▕ protected function doPipeline(Command ...$commands): array
85▕ {