Skip to content
This repository has been 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

Open
cweiske opened this issue Nov 6, 2018 · 2 comments · May be fixed by #93

Comments

@cweiske
Copy link

cweiske commented Nov 6, 2018

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.

cweiske added a commit to mogic-le/prometheus_client_php that referenced this issue Nov 6, 2018
@cweiske cweiske linked a pull request Nov 6, 2018 that will close this issue
@cweiske
Copy link
Author

cweiske commented Nov 23, 2018

Is there anything I can do to get this merged?

@ahoulgrave
Copy link

This is happening and a blocker for using this package.

LeSuisse pushed a commit to Enalean/php-prometheus-client that referenced this issue May 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants