Prevent spaces from being considered as a valid destination_number.

This commit is contained in:
FusionPBX
2022-06-16 15:07:21 -06:00
committed by GitHub
parent d6b1cdd63f
commit 7a6f02474e

View File

@@ -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']."<br>\n"; }
//if (strlen($destination_number) == 0) { $msg .= $text['message-required']." ".$text['label-destination_number']."<br>\n"; }
if (strlen($destination_number) == 0) { $msg .= $text['message-required']." ".$text['label-destination_number']."<br>\n"; }
if (strlen($destination_context) == 0) { $msg .= $text['message-required']." ".$text['label-destination_context']."<br>\n"; }
if (strlen($destination_enabled) == 0) { $msg .= $text['message-required']." ".$text['label-destination_enabled']."<br>\n"; }