BedrockStreaming / RedisMock

A simple PHP Redis mock
http://tech.m6web.fr/redismock-qui-a-bouchonne-mon-redis.html
MIT License
81 stars 60 forks source link

Warning "array_or_countable" in mehtod RedisMock:del() on PHP 7.2 #70

Open rs2487 opened 6 years ago

rs2487 commented 6 years ago

Affected code:

$deletedKeyCount += count(self::$dataValues[$this->storage][$k]);

Bugfix:

$value = self::$dataValues[$this->storage][$k];
$deletedKeyCount += is_array($value) ? count($value) : 1;