From 2e210c03d2e9bf85af96daf873d318cf76d0bc07 Mon Sep 17 00:00:00 2001 From: K-Flagman <105959875+k-flagman@users.noreply.github.com> Date: Tue, 8 Jul 2025 12:48:53 -0700 Subject: [PATCH] call_forward fix saving proccess with empty inputs #7414 --- app/call_forward/call_forward_edit.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/call_forward/call_forward_edit.php b/app/call_forward/call_forward_edit.php index 9e87798d8b..1cf50ad392 100644 --- a/app/call_forward/call_forward_edit.php +++ b/app/call_forward/call_forward_edit.php @@ -112,13 +112,13 @@ //get http post variables and set them to php variables if (!empty($_POST)) { - $forward_all_enabled = $_POST["forward_all_enabled"]; + $forward_all_enabled = !empty($_POST["forward_all_destination"]) ? $_POST["forward_all_enabled"] : 'false'; $forward_all_destination = $_POST["forward_all_destination"]; - $forward_busy_enabled = $_POST["forward_busy_enabled"]; + $forward_busy_enabled = !empty($_POST["forward_busy_destination"]) ? $_POST["forward_busy_enabled"] : 'false'; $forward_busy_destination = $_POST["forward_busy_destination"]; - $forward_no_answer_enabled = $_POST["forward_no_answer_enabled"]; + $forward_no_answer_enabled = !empty($_POST["forward_no_answer_destination"]) ? $_POST["forward_no_answer_enabled"] : 'false'; $forward_no_answer_destination = $_POST["forward_no_answer_destination"]; - $forward_user_not_registered_enabled = $_POST["forward_user_not_registered_enabled"]; + $forward_user_not_registered_enabled = !empty($_POST["forward_user_not_registered_destination"]) ? $_POST["forward_user_not_registered_enabled"] : 'false'; $forward_user_not_registered_destination = $_POST["forward_user_not_registered_destination"]; $cid_name_prefix = $_POST["cid_name_prefix"] ?? '';