Hello
We have set up a hostgroup for monitoring team that includes hosts and hostgroups and based on that, we have created a view but at some point there started a lot of warnings in http ssl_error_log:
[Mon Jun 10 10:28:17.806813 2024] [:error] [pid 12322] [client someip:61087] PHP Notice: Trying to get property of non-object in /usr/local/nagiosxi/html/includes/components/xicore/ajaxhelpers-hoststatus.inc.php on line 200, referer: https://servername/nagiosxi/includes/co ... hostattr=8
[Mon Jun 10 10:28:17.806860 2024] [:error] [pid 12322] [client someip:61087] PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/xicore/ajaxhelpers-hoststatus.inc.php on line 200, referer: https://servername/nagiosxi/includes/co ... hostattr=8
[Mon Jun 10 10:28:17.814760 2024] [:error] [pid 12322] [client someip:61087] PHP Notice: Trying to get property of non-object in /usr/local/nagiosxi/html/includes/components/xicore/ajaxhelpers-hoststatus.inc.php on line 332, referer: https://servername/nagiosxi/includes/co ... hostattr=8
[Mon Jun 10 10:28:17.814783 2024] [:error] [pid 12322] [client someip:61087] PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/xicore/ajaxhelpers-hoststatus.inc.php on line 332, referer: https://servername/nagiosxi/includes/co ... hostattr=8
Cant figure out what its reffering to, some badly configured hosts in the hostgroup or what? The view is actually working. Its a hostgroup with a filter: Filters: Host=Down,Unreachable,Not Acknowledged
http ssl error help
Re: http ssl error help
Hi @elinagios,
As all of those are marked either PHP Warning or PHP Notice, they can be considered non critical. We are aware of these notices and have a ticket logged internally to clean them up, but if you aren't seeing any application level errors with the page you're on, you should be safe to ignore these for now. Most likely they are the result of internal variables not being properly escaped in a non-harmful way. Let us know if you have any more questions about this, or if they are in fact causing problems, and we can take a closer look.
As all of those are marked either PHP Warning or PHP Notice, they can be considered non critical. We are aware of these notices and have a ticket logged internally to clean them up, but if you aren't seeing any application level errors with the page you're on, you should be safe to ignore these for now. Most likely they are the result of internal variables not being properly escaped in a non-harmful way. Let us know if you have any more questions about this, or if they are in fact causing problems, and we can take a closer look.
Re: http ssl error help
Yeah, to be clear @jsimon is saying that the warnings occur from something like this:
because $result might be null, trying to access or iterate will trigger warnings similar to what you're seeing. Of course, this is an error on our end and we apologize for the confusion.
Code: Select all
$result = database_call(); // could return null
echo $result->items; // if this is null, a warning is created (trying to get property of non-object)
foreach ($object as $item) { // Invalid argument supplied for foreach()
echo $item;
}
Re: http ssl error help
Ok, thank you, will ignore then.I have another dashboard with exact same filter but more hosts in it, that is getting similar warnings but very rarely compared to the first one. So not sure why the first gets more hits, both dashboards are on screen 24/7.