summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-04-14 13:23:02 -0400
committerjim-p <jimp@pfsense.org>2011-04-14 13:26:04 -0400
commitd2903c0cabbcef2a324835ebee9e62c8852a58f7 (patch)
treed65b9ace727598186f9bfa9bf875ef5855a1e550 /usr/local
parentc8cc0c1c5adc7c83a1d7e8c1e293d43baf74fdc0 (diff)
downloadpfsense-d2903c0cabbcef2a324835ebee9e62c8852a58f7.zip
pfsense-d2903c0cabbcef2a324835ebee9e62c8852a58f7.tar.gz
Test if a variable is set before trying to unset it. If a user has no rules in their config, then $config['filter'] would not be undefined, so unsettings $config['filter']['bypassstaticroutes'] would result in an error. http://forum.pfsense.org/index.php/topic,35702.0.html
Diffstat (limited to 'usr/local')
-rw-r--r--usr/local/www/system_advanced_firewall.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/local/www/system_advanced_firewall.php b/usr/local/www/system_advanced_firewall.php
index e532b78..0cdaad7 100644
--- a/usr/local/www/system_advanced_firewall.php
+++ b/usr/local/www/system_advanced_firewall.php
@@ -144,7 +144,7 @@ if ($_POST) {
if($_POST['bypassstaticroutes'] == "yes")
$config['filter']['bypassstaticroutes'] = $_POST['bypassstaticroutes'];
- else
+ elseif(isset($config['filter']['bypassstaticroutes']))
unset($config['filter']['bypassstaticroutes']);
if($_POST['disablescrub'] == "yes")
OpenPOWER on IntegriCloud