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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

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"; }