Commit 3dbfa187 authored by Ad Schellevis's avatar Ad Schellevis

(legacy) don't write empty xml tags in ipsec phase1/2 edit

parent 29d4755b
...@@ -363,7 +363,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -363,7 +363,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
foreach (explode(",",$copy_fields) as $fieldname) { foreach (explode(",",$copy_fields) as $fieldname) {
$fieldname = trim($fieldname); $fieldname = trim($fieldname);
if(isset($pconfig[$fieldname])) { if(!empty($pconfig[$fieldname])) {
$ph1ent[$fieldname] = $pconfig[$fieldname]; $ph1ent[$fieldname] = $pconfig[$fieldname];
} }
} }
......
...@@ -383,7 +383,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -383,7 +383,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
// 1-on-1 copy // 1-on-1 copy
foreach (explode(",",$copy_fields) as $fieldname) { foreach (explode(",",$copy_fields) as $fieldname) {
$fieldname = trim($fieldname); $fieldname = trim($fieldname);
if(isset($pconfig[$fieldname])) { if(!empty($pconfig[$fieldname])) {
$ph2ent[$fieldname] = $pconfig[$fieldname]; $ph2ent[$fieldname] = $pconfig[$fieldname];
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment