mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Type safety check (#15409)
* Type safety check now fails silently, we already have schema validation to check it is a string, but... people find a way. * Fixup
This commit is contained in:
@@ -445,7 +445,8 @@ class NetSnmpQuery implements SnmpQueryInterface
|
||||
}
|
||||
|
||||
// os directory
|
||||
if ($os_mibdir = Config::getOsSetting($this->device->os, 'mib_dir')) {
|
||||
$os_mibdir = Config::getOsSetting($this->device->os, 'mib_dir');
|
||||
if ($os_mibdir && is_string($os_mibdir)) {
|
||||
$dirs[] = "$base/$os_mibdir";
|
||||
} elseif (file_exists($base . '/' . $this->device->os)) {
|
||||
$dirs[] = $base . '/' . $this->device->os;
|
||||
|
Reference in New Issue
Block a user