php-redisearch icon indicating copy to clipboard operation
php-redisearch copied to clipboard

ConfigSet.php bug

Open juvenrui opened this issue 9 months ago • 0 comments

macfja/redisearch/src/Redis/Command/ConfigSet.php, function setConfig():

$this->options['options'][0]->setValue($name);
$this->options['options'][1]->setValue($name);
$this->options['value']->setValue($value);

Runtime:

$client->execute((new Command\ConfigSet($rediSearchVersion))->setConfig('DEFAULT_DIALECT', 2))

Throw exception: AbstractCommand.php 74: Missing command option: options

Fix:

$this->options['options'][0]->setValue($name);
$this->options['options'][1]->setValue($name);
$this->options['options'][2]->setValue($name);

Add line: $this->options['options'][2]->setValue($name);

juvenrui avatar Feb 18 '25 02:02 juvenrui