From d2903c0cabbcef2a324835ebee9e62c8852a58f7 Mon Sep 17 00:00:00 2001 From: jim-p Date: Thu, 14 Apr 2011 13:23:02 -0400 Subject: 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 --- usr/local/www/system_advanced_firewall.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr') 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") -- cgit v1.1