From e2524388c4b13cd7eecb583fa42231f3ef92e2ce Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Tue, 10 Oct 2023 09:21:23 +0200 Subject: [PATCH] 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. --- src/www/system_gateways_edit.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/www/system_gateways_edit.php b/src/www/system_gateways_edit.php index 1fb6b9617..38e0c4d2e 100644 --- a/src/www/system_gateways_edit.php +++ b/src/www/system_gateways_edit.php @@ -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; }