From b406c78a1fa408dde44fdbba5eedd103fc20b1fd Mon Sep 17 00:00:00 2001 From: Ermal Date: Tue, 19 Feb 2013 17:20:33 +0000 Subject: [PATCH] Be explicit on the testing --- usr/local/www/status_graph.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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; }