Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use object of type stdClass as array #14

Open
tompointexe opened this issue Dec 14, 2020 · 2 comments
Open

Cannot use object of type stdClass as array #14

tompointexe opened this issue Dec 14, 2020 · 2 comments

Comments

@tompointexe
Copy link

tompointexe commented Dec 14, 2020

Hi, just installed pnp4nagios and i'm getting an error when i want to get the data in grafana

Thanks in advance
Fatal error: Cannot use object of type stdClass as array in /usr/local/pnp4nagios/share/application/controllers/api.php on line 157

@prosorin
Copy link

This error seems to be PHP related. The original code works fine on PHP5.x.
It would be nice to get a version of the script that works with PHP7/8.

@sni
Copy link
Contributor

sni commented Dec 15, 2022

I think the issue is more related to pnp itself. We use the api unmodified with php7/8 but had to apply patches to pnp itself.
Here is a list of patches we use:
https://github.com/ConSol/omd/tree/labs/packages/pnp4nagios/patches

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants