Operator Panel: Updates for PHP 8.1

This commit is contained in:
fusionate
2023-06-08 19:32:39 +00:00
parent 1b3af9fb36
commit 4ac06a9194
5 changed files with 38 additions and 27 deletions

View File

@@ -145,7 +145,7 @@ if (!class_exists('basic_operator_panel')) {
$presence_id = $field['presence_id'];
$presence = explode("@", $presence_id);
$presence_id = $presence[0];
$presence_domain = $presence[1];
$presence_domain = $presence[1] ?? '';
if ($user == $presence_id) {
if ($presence_domain == $_SESSION['domain_name']) {
$found = true;

View File

@@ -274,7 +274,7 @@ if (is_array($activity)) {
$call_number = $ext['dest'];
}
else {
$call_name = $activity[$ext['dest']]['effective_caller_id_name'];
$call_name = $activity[$ext['dest']]['effective_caller_id_name'] ?? null;
$call_number = format_phone($ext['dest']);
}
$dir_icon = 'outbound';
@@ -391,7 +391,7 @@ if (is_array($activity)) {
}
else {
//user extension
if ($ext['uuid'] != '' && $ext['uuid'] == $ext['call_uuid'] && $ext['variable_bridge_uuid'] == '') {
if ($ext['uuid'] != '' && $ext['uuid'] == $ext['call_uuid'] && empty($ext['variable_bridge_uuid'])) {
$draggable = false;
}
else if (!empty($ext_state) && $ext_state == 'ringing' && $ext['variable_call_direction'] == 'local') {
@@ -476,7 +476,7 @@ if (is_array($activity)) {
}
//hangup
if (permission_exists('operator_panel_hangup') || in_array($extension, $_SESSION['user']['extensions'])) {
if ($ext['variable_bridge_uuid'] == '' && $ext_state == 'ringing') {
if (empty($ext['variable_bridge_uuid']) && $ext_state == 'ringing') {
$call_identifier_hangup_uuid = $ext['uuid'];
}
else if ($dir_icon == 'outbound') {