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

This commit is contained in:
jim-p 2011-04-14 13:23:02 -04:00
parent c8cc0c1c5a
commit d2903c0cab

View File

@ -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")