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

Fix pushgateway delete method #82

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

lvrach
Copy link

@lvrach lvrach commented Aug 14, 2018

I got the following error when calling $pushgateway->delete(...):

Argument 1 passed to Prometheus\PushGateway::doRequest() must be an instance of Prometheus\CollectorRegistry, null given, called in /.../vendor/jimdo/prometheus_client_php/src/Prometheus/PushGateway.php on line 54
#0 /.../vendor/jimdo/prometheus_client_php/src/Prometheus/PushGateway.php(54): Prometheus\PushGateway->doRequest(NULL, 'resque-php', Array, 'delete') 
...

Because delete method was calling doRequest with null $collectorRegistry, but the method definition did not permit it.

I simple change doRequest to accept null $collectorRegistry.

lvrach and others added 2 commits August 14, 2018 21:04
@jlis
Copy link

jlis commented Aug 22, 2018

Also fixed in #81. But still not merged.

@NoelDavies
Copy link

This project is dead, but I'm maintaining it under my employer - https://github.com/endclothing/prometheus_client_php. Feel free to submit the PR there.

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 this pull request may close these issues.

3 participants