Use empty instead of strlen or is_array

This commit is contained in:
FusionPBX 2023-05-10 22:18:42 -06:00 committed by GitHub
parent 442147391c
commit 6f554eefa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@
$this->toggle_values = ['true','false'];
//set the domain_uuid if not provided
if (strlen($this->domain_uuid ?? '') === 0) {
if (empty($this->domain_uuid)) {
$this->domain_uuid = $_SESSION['domain_uuid'];
}
@ -143,7 +143,7 @@
}
}
else {
if (is_array($voicemail_ids) && @sizeof($voicemail_ids) != 0) {
if (!empty($voicemail_ids) && @sizeof($voicemail_ids) != 0) {
//show only the assigned voicemail ids
$sql .= "and ";
if (is_numeric($this->voicemail_id) && in_array($this->voicemail_id, $voicemail_ids)) {