mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
use is_array() to guard against more garbage.
This commit is contained in:
@@ -159,10 +159,10 @@ class Component
|
||||
}
|
||||
|
||||
// Sort each component array so the attributes are in order.
|
||||
if (!empty($RESULT[$RESULT[$COMPONENT['device_id']][$COMPONENT['id']]])) {
|
||||
if (is_array($RESULT[$RESULT[$COMPONENT['device_id']][$COMPONENT['id']]])) {
|
||||
ksort($RESULT[$RESULT[$COMPONENT['device_id']][$COMPONENT['id']]]);
|
||||
}
|
||||
if (!empty($RESULT[$RESULT[$COMPONENT['device_id']]])) {
|
||||
if (is_array($RESULT[$RESULT[$COMPONENT['device_id']]])) {
|
||||
ksort($RESULT[$RESULT[$COMPONENT['device_id']]]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user