Fix some ErrorExceptions (#14241)

* Fix some ErrorExceptions

* Use Config::get default value

Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
Jellyfrog
2022-08-25 10:03:06 +02:00
committed by GitHub
parent a0b8b09f97
commit 835eac1233
5 changed files with 8 additions and 6 deletions

View File

@@ -21,7 +21,7 @@ if (count($drives)) {
$skipdrive = 0;
if ($device['os'] == 'junos') {
foreach (\LibreNMS\Config::get('ignore_junos_os_drives') as $jdrive) {
foreach (\LibreNMS\Config::get('ignore_junos_os_drives', []) as $jdrive) {
if (preg_match($jdrive, $drive['storage_descr'])) {
$skipdrive = 1;
}
@@ -31,7 +31,7 @@ if (count($drives)) {
}
if ($device['os'] == 'freebsd') {
foreach (\LibreNMS\Config::get('ignore_bsd_os_drives') as $jdrive) {
foreach (\LibreNMS\Config::get('ignore_bsd_os_drives', []) as $jdrive) {
if (preg_match($jdrive, $drive['storage_descr'])) {
$skipdrive = 1;
}