Skip to content

RedisArray getKeys & keys different returns #1618

Description

@TuningYourCode

Expected behaviour

That getKeys & keys work the same way on RedisArray. keys-function do not work at all currently.

Actual behaviour

keys-Function returns always:

[$server => UNKNOWN:0]

I'm seeing this behaviour on

  • OS: Debian Stretch
  • Redis: Redis server v=3.2.8
  • PHP: 7.1.31-1+020190807.22+debian91.gbpf402ed (Sury-Repo)
  • phpredis: php-redis 5.0.2+4.3.0-1+020190808.13+debian91.gbpcc7e06 (Sury-Repo)

Steps to reproduce, backtrace or example script

<?php
$redis = new \RedisArray(['localhost:6379']);
echo 'keys-function' . PHP_EOL;
var_dump($redis->keys('*integration'));
echo 'keys-function from variable' . PHP_EOL;
$keys = $redis->keys('*integration');
var_dump($keys);
echo 'getKeys-function' . PHP_EOL;
var_dump($redis->getKeys('*integration'));
echo 'empty-Array' . PHP_EOL;
var_dump([]);

Output:

keys-function
array(1) {
  ["localhost:6379"]=>
  UNKNOWN:0
}
keys-function from variable
array(1) {
  ["localhost:6379"]=>
  UNKNOWN:0
}
getKeys-function
array(0) {
}
empty-Array
array(0) {
}

I've checked

  • There is no similar issue from other users
  • Issue isn't fixed in develop branch
    Not tested the development branch but changelog does not notify anything about that issue.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions