RedisMock icon indicating copy to clipboard operation
RedisMock copied to clipboard

HDEL - wrong arguments

Open xeops opened this issue 6 years ago • 3 comments

array_key_exists(): The first argument should be either a string or an integer at m6web/redis-mock/src/M6Web/Component/RedisMock/RedisMock.php:756

vendor/predis/predis/src/ClientInterface.php:69

  • @method int hdel($key, array $fields)

xeops avatar Nov 01 '19 10:11 xeops

you probably called hdel with bad arguments. please check it

omansour avatar Nov 04 '19 09:11 omansour

you probably called hdel with bad arguments. please check it

Sorry for bad English and describing a problem, but. When I call hdel like

$this->redis->hdel($key, [$field]);

i have an error

array_key_exists(): The first argument should be either a string or an integer at
m6web/redis-mock/src/M6Web/Component/RedisMock/RedisMock.php:756

But I cant send not array in hdel because in vendor/predis/predis/src/ClientInterface.php:69 @method int hdel($key, array $fields) accept only array as second variable.

xeops avatar Nov 05 '19 07:11 xeops

I see. This library is so old. It needs to be updated with type hinting and other

omansour avatar Nov 05 '19 14:11 omansour