diff --git a/usr/local/www/status_graph.php b/usr/local/www/status_graph.php index 2313e669a0..cd08de285d 100755 --- a/usr/local/www/status_graph.php +++ b/usr/local/www/status_graph.php @@ -72,9 +72,13 @@ foreach (array('server', 'client') as $mode) { if ($_GET['if']) { $curif = $_GET['if']; $found = false; - foreach($ifdescrs as $descr => $ifdescr) - if($descr == $curif) $found = true; - if(!$found) { + foreach($ifdescrs as $descr => $ifdescr) { + if ($descr == $curif) { + $found = true; + break; + } + } + if ($found === false) { Header("Location: status_graph.php"); exit; }