From 128c330ebbc96f9573df42166621a4b32fdaa71d Mon Sep 17 00:00:00 2001 From: Aaron Daniels Date: Sun, 2 Aug 2015 20:18:14 +1000 Subject: [PATCH] Resolved bug where $text would use the previous iteration if $sla_type was unknown. Now set a default $text value which will be over written if $sla_type is known. --- html/pages/device/slas.inc.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/html/pages/device/slas.inc.php b/html/pages/device/slas.inc.php index 587c7d743..a84a8833d 100644 --- a/html/pages/device/slas.inc.php +++ b/html/pages/device/slas.inc.php @@ -9,6 +9,9 @@ $slas = dbFetchRows('SELECT * FROM `slas` WHERE `device_id` = ? AND `deleted` = // Collect types $sla_types = array('all' => 'All'); foreach ($slas as $sla) { + // Set a default type, if we know about it, it will be overwritten below. + $text = 'Unknown'; + $sla_type = $sla['rtt_type']; if (!in_array($sla_type, $sla_types)) {