system: only call dpinger defaults once

Since we iterate over all and store the result as it is found
we can just use an empty array as a starting point.
This commit is contained in:
Franco Fichtner 2023-10-10 09:21:23 +02:00
parent abb24e1c86
commit e2524388c4

View File

@ -200,8 +200,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
/****
/* XXX: dpinger needs to take defaults under consideration
/****/
$dpinger_config = $gateways->getDpingerDefaults();
foreach ($dpinger_config as $prop => $value) {
$dpinger_config = [];
foreach ($dpinger_default as $prop => $value) {
$dpinger_config[$prop] = !empty($pconfig[$prop]) ? $pconfig[$prop] : $value;
}