use is_array() to guard against more garbage.

This commit is contained in:
Tony Murray
2018-09-13 08:19:33 -05:00
parent 867586c416
commit 9189928b76
+2 -2
View File
@@ -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']]]);
}
}