diff options
author | jim-p <jimp@pfsense.org> | 2011-04-14 13:23:02 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-04-14 13:26:04 -0400 |
commit | d2903c0cabbcef2a324835ebee9e62c8852a58f7 (patch) | |
tree | d65b9ace727598186f9bfa9bf875ef5855a1e550 /usr/local | |
parent | c8cc0c1c5adc7c83a1d7e8c1e293d43baf74fdc0 (diff) | |
download | pfsense-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.php | 2 |
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") |