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.
This commit is contained in:
Aaron Daniels
2015-08-02 20:18:14 +10:00
parent 9ccfc0d2b5
commit 128c330ebb

View File

@ -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)) {