Comparison fix in slas.inc.php (#10812)

In the 'slas' table, the column 'opstatus' is of type int. The current
comparison does not work correctly - in the web-interface all sla-probes are
displayed as 'down', even if the status = 0 in the table (0 is OK).
This commit is contained in:
seros1521
2019-11-13 13:03:08 +07:00
committed by Tony Murray
parent c95661b482
commit 1b5253fb3d

View File

@@ -70,7 +70,7 @@ foreach ($slas as $sla) {
continue;
}
$opstatus = ($sla['opstatus'] === '0') ? 'up' : 'down';
$opstatus = ($sla['opstatus'] === 0) ? 'up' : 'down';
d_echo("<br>Opstatus :: var: ".$vars['opstatus'].", db: ".$sla['opstatus'].", name: ".$opstatus."<br>");
if ($vars['opstatus'] != 'all' && $vars['opstatus'] != $opstatus) {
continue;