summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal Luçi <ermal.luci@gmail.com>2012-12-31 05:16:44 -0800
committerErmal Luçi <ermal.luci@gmail.com>2012-12-31 05:16:44 -0800
commit0e39c30376cce25e86af9afa519e4ad0aa9a2d65 (patch)
tree9c869d750fe8f5adb14163e9886a03cb6acb8325
parent2e4c921fcc177cd4f5213af57e1d7e8ce9e57e62 (diff)
parent76165eace0ff908eb1c7dfa436eba6be7ea1ea1a (diff)
downloadpfsense-0e39c30376cce25e86af9afa519e4ad0aa9a2d65.zip
pfsense-0e39c30376cce25e86af9afa519e4ad0aa9a2d65.tar.gz
Merge pull request #302 from phil-davis/master
Select a valid interface when WAN is disabled
-rwxr-xr-xusr/local/www/status_graph.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr/local/www/status_graph.php b/usr/local/www/status_graph.php
index 7f59cb3..2313e66 100755
--- a/usr/local/www/status_graph.php
+++ b/usr/local/www/status_graph.php
@@ -79,7 +79,14 @@ if ($_GET['if']) {
exit;
}
} else {
- $curif = "wan";
+ if (empty($ifdescrs["wan"])) {
+ /* Handle the case when WAN has been disabled. Use the first key in ifdescrs. */
+ reset($ifdescrs);
+ $curif = key($ifdescrs);
+ }
+ else {
+ $curif = "wan";
+ }
}
if ($_GET['sort']) {
$cursort = $_GET['sort'];
OpenPOWER on IntegriCloud