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

[EON 6] White page and error 500 when importing #38

Open
lionelbeard opened this issue Nov 22, 2023 · 0 comments
Open

[EON 6] White page and error 500 when importing #38

lionelbeard opened this issue Nov 22, 2023 · 0 comments

Comments

@lionelbeard
Copy link

Hi,

When we import XML files exported from EON5.3, we get following error into /var/log/httpd/ssl_error_log:

PHP Fatal error: Uncaught TypeError: call_user_func(): Argument #1 ($callback) must be a valid callback, non-static method NagiosServiceGroupPeer::getByName() cannot be called statically in /srv/eyesofnetwork/lilac/classes/EoN_Importer.php:544\nStack trace:\n#0 /srv/eyesofnetwork/lilac/classes/EoN_Importer.php(243): EoN_Importer->EON_Import_Links()\n#1 /srv/eyesofnetwork/lilac/classes/EoN_Importer.php(100): EoN_Importer->EoN_Import_Recursive()\n#2 /srv/eyesofnetwork/lilac/importer.php(64): EoN_Importer->EoN_Import_Object()\n#3 {main}\n thrown in /srv/eyesofnetwork/lilac/classes/EoN_Importer.php on line 544, referer: https://<EON_URL>/lilac/importer.php

This issue was reported as Warning under PHP < 8 (EON 5.3), but it is now a Fatal error on PHP >= 8.

I found that import is working after setting getByName() function as static on /srv/eyesofnetwork/lilac/classes/*Peer.php
public function getByName($name) => static public function getByName($name)

I don't know if it is the right way to do (I am not a PHP developer), but for now it is working :-)

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

1 participant