From 4adc7d808593c5c370b9624f51bc1f529cd0b995 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Mon, 21 Jan 2013 18:19:13 +0000 Subject: [PATCH] Fix a bug with destinations when a fax destination was not selected it prevented update from working. --- app/destinations/destinations_edit.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/destinations/destinations_edit.php b/app/destinations/destinations_edit.php index 916b038491..1fb172b7d2 100644 --- a/app/destinations/destinations_edit.php +++ b/app/destinations/destinations_edit.php @@ -146,7 +146,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $sql .= "destination_caller_id_name = '$destination_caller_id_name', "; $sql .= "destination_caller_id_number = '$destination_caller_id_number', "; $sql .= "destination_context = '$destination_context', "; - $sql .= "fax_uuid = '$fax_uuid', "; + if (strlen($fax_uuid) > 0) { + $sql .= "fax_uuid = '$fax_uuid', "; + } $sql .= "destination_enabled = '$destination_enabled', "; $sql .= "destination_description = '$destination_description' "; $sql .= "where domain_uuid = '$domain_uuid' ";