From 94fc7b41d107b7cc193b4976f1c0fd3fa8d1d1b2 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Wed, 14 Nov 2012 00:11:39 +0000 Subject: [PATCH] Fix bug with destinations. --- app/destinations/destinations_edit.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/destinations/destinations_edit.php b/app/destinations/destinations_edit.php index 5fa78caba9..916b038491 100644 --- a/app/destinations/destinations_edit.php +++ b/app/destinations/destinations_edit.php @@ -100,7 +100,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $sql .= "destination_caller_id_name, "; $sql .= "destination_caller_id_number, "; $sql .= "destination_context, "; - $sql .= "fax_uuid, "; + if (strlen($fax_uuid) > 0) { + $sql .= "fax_uuid, "; + } $sql .= "destination_enabled, "; $sql .= "destination_description "; $sql .= ")"; @@ -116,7 +118,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $sql .= "'$destination_caller_id_name', "; $sql .= "'$destination_caller_id_number', "; $sql .= "'$destination_context', "; - $sql .= "'$fax_uuid', "; + if (strlen($fax_uuid) > 0) { + $sql .= "'$fax_uuid', "; + } $sql .= "'$destination_enabled', "; $sql .= "'$destination_description' "; $sql .= ")";