mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
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:
@@ -9,6 +9,9 @@ $slas = dbFetchRows('SELECT * FROM `slas` WHERE `device_id` = ? AND `deleted` =
|
|||||||
// Collect types
|
// Collect types
|
||||||
$sla_types = array('all' => 'All');
|
$sla_types = array('all' => 'All');
|
||||||
foreach ($slas as $sla) {
|
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'];
|
$sla_type = $sla['rtt_type'];
|
||||||
|
|
||||||
if (!in_array($sla_type, $sla_types)) {
|
if (!in_array($sla_type, $sla_types)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user