diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php
index f3d7f0e5ce..1e44014a10 100644
--- a/app/destinations/destination_edit.php
+++ b/app/destinations/destination_edit.php
@@ -156,10 +156,15 @@
exit;
}
+ //prevent spaces from being considered as a valid destination_number
+ if (isset($destination_number)) {
+ $destination_number = trim($destination_number);
+ }
+
//check for all required data
$msg = '';
if (strlen($destination_type) == 0) { $msg .= $text['message-required']." ".$text['label-destination_type']."
\n"; }
- //if (strlen($destination_number) == 0) { $msg .= $text['message-required']." ".$text['label-destination_number']."
\n"; }
+ if (strlen($destination_number) == 0) { $msg .= $text['message-required']." ".$text['label-destination_number']."
\n"; }
if (strlen($destination_context) == 0) { $msg .= $text['message-required']." ".$text['label-destination_context']."
\n"; }
if (strlen($destination_enabled) == 0) { $msg .= $text['message-required']." ".$text['label-destination_enabled']."
\n"; }