fixed error in loop option email with _name

This commit is contained in:
asus
2024-04-03 14:07:25 +02:00
parent 913165a056
commit 8ac16dc1f4
3 changed files with 14 additions and 7 deletions

View File

@@ -171,7 +171,13 @@ function update_emails_settings_option_CIPF($request, $option_name, $option_data
//error_log("option_data bedore: " . json_encode($option_data));
foreach ($option_data as $email_type => $email_options) {
//error_log("email_type: " . $email_type);
$option_data[$email_type] = update_email_by_type_CIPF($email_type, $email_options, $request);
if ($email_type === '_name') {
continue;
}
$ret_email = update_email_by_type_CIPF($email_type, $email_options, $request);
if ($ret_email !== false) {
$option_data[$email_type] = $ret_email;
}
}
//error_log("option_data after : " . json_encode($option_data));
@@ -187,6 +193,10 @@ function update_emails_settings_option_CIPF($request, $option_name, $option_data
function update_email_by_type_CIPF($email_type, $email_options, $request) {
Plgntls::debug_infos();
//error_log("email type: " . $email_type);
if ($email_type === '_name') {
return false;
}
/*
* set notification/confirmation_send to false by default,
* because the request only contains the value 'on' if checked, nothing for false