ipsec: fix trimming NULL values

Not sure how I managed to misconfigure this but since the
function relies on returning null make the trimming conditional.
This commit is contained in:
Franco Fichtner 2025-04-17 09:59:20 +02:00
parent e09112ab45
commit 302ed6b037

View File

@ -686,7 +686,7 @@ function ipsec_find_id(&$ph1ent, $side = 'local')
$thisid_data = $id_data;
}
return trim($thisid_data);
return is_string($thisid_data) ? trim($thisid_data) : $thisid_data;
}
/* include all configuration functions */