Skip to content

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

@rs2487

Description

@rs2487
  • Version: 2.8.0
  • PHP: 7.2
  • Warning: "Parameter must be an array or an object that implements Countable"

Affected code:

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

Bugfix:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions