diff options
author | Ermal Luçi <ermal.luci@gmail.com> | 2012-12-31 05:16:44 -0800 |
---|---|---|
committer | Ermal Luçi <ermal.luci@gmail.com> | 2012-12-31 05:16:44 -0800 |
commit | 0e39c30376cce25e86af9afa519e4ad0aa9a2d65 (patch) | |
tree | 9c869d750fe8f5adb14163e9886a03cb6acb8325 | |
parent | 2e4c921fcc177cd4f5213af57e1d7e8ce9e57e62 (diff) | |
parent | 76165eace0ff908eb1c7dfa436eba6be7ea1ea1a (diff) | |
download | pfsense-0e39c30376cce25e86af9afa519e4ad0aa9a2d65.zip pfsense-0e39c30376cce25e86af9afa519e4ad0aa9a2d65.tar.gz |
Merge pull request #302 from phil-davis/master
Select a valid interface when WAN is disabled
-rwxr-xr-x | usr/local/www/status_graph.php | 9 |
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']; |