MacFJA / php-redisearch

PHP Client for RediSearch
MIT License
66 stars 9 forks source link

assert(): assert(is_array($rawDefinitions)) failed #32

Closed candivan closed 2 years ago

candivan commented 2 years ago

https://github.com/phpredis/phpredis/issues/1550. refer to this acticle

vendor/macfja/redisearch/src/Redis/Client/PhpredisClient.php
public function execute(Command $command)
    {
        $arguments = $command->getArguments();
        if (0 === count($arguments)) {
            $arguments = [null];
        }
        $this->redis->setOption(Redis::OPT_REPLY_LITERAL, true); 
        $rawResponse = $this->redis->rawCommand($command->getId(), ...$arguments);

        return $command->parseResponse($rawResponse);
    }

$this->redis->setOption(Redis::OPT_REPLY_LITERAL, true); add this line solve the problems