EyesOfNetworkCommunity / EyesOfNetworkCommunity/lilac
[EON 6] White page and error 500 when importing
- Dominant language
- PHP
- Stars
- 2
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
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:///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 :-)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.