diff options
author | Ermal <eri@pfsense.org> | 2014-04-07 17:38:47 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2014-04-07 17:38:47 +0000 |
commit | 1d0cacfee50e869ae7f2c2a34fb0910af68481c8 (patch) | |
tree | b993918606d42d23a4dad0fc15721dd10d7aae00 | |
parent | ca321bfde902edc21589083c6dd283d1ce1e7d74 (diff) | |
download | pfsense-1d0cacfee50e869ae7f2c2a34fb0910af68481c8.zip pfsense-1d0cacfee50e869ae7f2c2a34fb0910af68481c8.tar.gz |
Check if the ipsec section exists before doing operations on it.
-rw-r--r-- | usr/local/www/system_advanced_misc.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/usr/local/www/system_advanced_misc.php b/usr/local/www/system_advanced_misc.php index 421c3af..967f01d 100644 --- a/usr/local/www/system_advanced_misc.php +++ b/usr/local/www/system_advanced_misc.php @@ -170,11 +170,13 @@ if ($_POST) { elseif (isset($config['ipsec']['failoverforcereload'])) unset($config['ipsec']['failoverforcereload']); - foreach ($ipsec_loglevels as $lkey => $ldescr) { - if (empty($_POST["ipsec_{$lkey}"])) - unset($config['ipsec']["ipsec_{$lkey}"]); - else - $config['ipsec']["ipsec_{$lkey}"] = $_POST["ipsec_{$lkey}"]; + if (is_array($config['ipsec'])) { + foreach ($ipsec_loglevels as $lkey => $ldescr) { + if (empty($_POST["ipsec_{$lkey}"])) + unset($config['ipsec']["ipsec_{$lkey}"]); + else + $config['ipsec']["ipsec_{$lkey}"] = $_POST["ipsec_{$lkey}"]; + } } if($_POST['noinstalllanspd'] == "yes") { if (!isset($pconfig['noinstalllanspd'])) |