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

Fix pushgateway delete method#82

Open
lvrach wants to merge 2 commits into
Jimdo:masterfrom
lvrach:lvrach-patch-1
Open

Fix pushgateway delete method#82
lvrach wants to merge 2 commits into
Jimdo:masterfrom
lvrach:lvrach-patch-1

Conversation

@lvrach

@lvrach lvrach commented Aug 14, 2018

Copy link
Copy Markdown

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

jlis commented Aug 22, 2018

Copy link
Copy Markdown

Also fixed in #81. But still not merged.

@NoelDavies

Copy link
Copy Markdown

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