Skip to content
This repository was archived by the owner on Oct 22, 2019. It is now read-only.

Redis::collectHistograms() throws PHP warning: sort() expects parameter 1 to be array, boolean given #92

@cweiske

Description

@cweiske

When no histogram data have been pushed into redis yet, calling Prometheus\Storage\Redis::collectHistograms results in a PHP warning:

warning: sort() expects parameter 1 to be array, boolean given

This is because

$keys = $this->redis->sMembers(self::$prefix . Histogram::TYPE . self::PROMETHEUS_METRIC_KEYS_SUFFIX);

returns false.

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