Get_class() expects parameter 1 to be object, null given

daily.sh is actual, validate.php shows no errors.

/device-groups gives following error in librenms.log

production.ERROR: get_class() expects parameter 1 to be object, null given (View: /opt/librenms/resources/views/layouts/menu.blade.php) (View: /opt/librenms/resources/views/layouts/menu.blade.php) (View: /opt/librenms/resources/views/layouts/menu.blade.php) {“userId”:3,“exception”:"[object] (ErrorException(code: 0): get_class() expects parameter 1 to be object, null given (View: /opt/librenms/resources/views/layouts/menu.blade.php) (View: /opt/librenms/resources/views/layouts/menu.blade.php) (View: /opt/librenms/resources/views/layouts/menu.blade.php) at /opt/librenms/LibreNMS/Plugins.php:107, ErrorException(code: 0): get_class() expects parameter 1 to be object, null given (View: /opt/librenms/resources/views/layouts/menu.blade.php) (View: /opt/librenms/resources/views/layouts/menu.blade.php) at /opt/librenms/LibreNMS/Plugins.php:107, ErrorException(code: 0): get_class() expects parameter 1 to be object, null given (View: /opt/librenms/resources/views/layouts/menu.blade.php) at /opt/librenms/LibreNMS/Plugins.php:107, ErrorException(code: 0): get_class() expects parameter 1 to be object, null given at /opt/librenms/LibreNMS/Plugins.php:107)
[stacktrace]

Apparently code is not fully compatible to php 7.2.x ?

Regards
Timo

Not a PHP 7.2 issue, LibreNMS supports up to PHP 7.3

Somehow you’ve enabled a plugin that doesn’t exist? Maybe had a plugin enabled and removed the files?

@murrant Thank you a lot for pushing me in the right direction. Indeed a colleague played witha plugin and then just deleted the files…Works like a charm now.

Timo

I also submitted a patch to prevent the error if that is the case :slight_smile: