diff --git a/app/xml_cdr/resources/dashboard/missed_calls.php b/app/xml_cdr/resources/dashboard/missed_calls.php index 130834ff50..bf4fc5e9db 100644 --- a/app/xml_cdr/resources/dashboard/missed_calls.php +++ b/app/xml_cdr/resources/dashboard/missed_calls.php @@ -50,7 +50,7 @@ $sql .= " ) \n"; $sql .= " and (missed_call = true or bridge_uuid is null) "; $sql .= " and hangup_cause <> 'LOSE_RACE' "; - if (is_array($assigned_extensions) && sizeof($assigned_extensions) != 0) { + if (!empty($assigned_extensions)) { $x = 0; foreach ($assigned_extensions as $assigned_extension_uuid => $assigned_extension) { $sql_where_array[] = "extension_uuid = :assigned_extension_uuid_".$x; @@ -59,7 +59,7 @@ $parameters['destination_number_'.$x] = $assigned_extension; $x++; } - if (is_array($sql_where_array) && sizeof($sql_where_array) != 0) { + if (!empty($sql_where_array)) { $sql .= "and (".implode(' or ', $sql_where_array).") \n"; } unset($sql_where_array); @@ -70,7 +70,7 @@ $parameters['domain_uuid'] = $_SESSION['domain_uuid']; if (!isset($database)) { $database = new database; } $result = $database->select($sql, $parameters, 'all'); - $num_rows = is_array($result) ? sizeof($result) : 0; + $num_rows = !empty($result) ? sizeof($result) : 0; //define row styles $c = 0; @@ -189,4 +189,4 @@ echo ""; echo "\n"; -?> \ No newline at end of file +?>