diff options
author | Ermal <eri@pfsense.org> | 2013-02-19 17:20:33 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-02-19 17:20:33 +0000 |
commit | b406c78a1fa408dde44fdbba5eedd103fc20b1fd (patch) | |
tree | ea145eb5a455f21941ccfc7f6a287deb54858d2e | |
parent | c3ebb2f867d33d588c8ad349948b2b7dea835498 (diff) | |
download | pfsense-b406c78a1fa408dde44fdbba5eedd103fc20b1fd.zip pfsense-b406c78a1fa408dde44fdbba5eedd103fc20b1fd.tar.gz |
Be explicit on the testing
-rwxr-xr-x | usr/local/www/status_graph.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr/local/www/status_graph.php b/usr/local/www/status_graph.php index 2313e66..cd08de2 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; } |