From 777b56ae9a5e7782d375aad2c695c508ef4d81e8 Mon Sep 17 00:00:00 2001 From: Alex <40072887+alexdcrane@users.noreply.github.com> Date: Fri, 9 Jun 2023 15:01:46 -0600 Subject: [PATCH] Fixed call broadcast and call block php 8.1 errors (#6750) * Update call_block_edit.php * Update call_broadcast_send.php * Update call_broadcast_send.php --- app/call_block/call_block_edit.php | 2 +- app/call_broadcast/call_broadcast_send.php | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/call_block/call_block_edit.php b/app/call_block/call_block_edit.php index d1aff3eb58..a5620b5376 100644 --- a/app/call_block/call_block_edit.php +++ b/app/call_block/call_block_edit.php @@ -102,7 +102,7 @@ } break; case 'add': - $xml_cdrs = $_POST['xml_cdrs']; + $xml_cdrs = $_POST['xml_cdrs'] ?? null; if (!empty($xml_cdrs) && permission_exists('call_block_add')) { $obj = new call_block; $obj->call_block_direction = $call_block_direction; diff --git a/app/call_broadcast/call_broadcast_send.php b/app/call_broadcast/call_broadcast_send.php index 1be85be155..cec6e1a851 100644 --- a/app/call_broadcast/call_broadcast_send.php +++ b/app/call_broadcast/call_broadcast_send.php @@ -47,7 +47,7 @@ $text = $language->get(); //set the max execution time to 1 hour - ini_set(max_execution_time,3600); + ini_set('max_execution_time',3600); //define the asynchronous command function function cmd_async($cmd) { @@ -68,12 +68,12 @@ } //get the http get values and set as php variables - $group_name = $_GET["group_name"]; - $call_broadcast_uuid = $_GET["id"]; - $user_category = $_GET["user_category"]; - $gateway = $_GET["gateway"]; - $phonetype1 = $_GET["phonetype1"]; - $phonetype2 = $_GET["phonetype2"]; + $group_name = $_GET["group_name"] ?? ''; + $call_broadcast_uuid = $_GET["id"] ?? ''; + $user_category = $_GET["user_category"] ?? ''; + $gateway = $_GET["gateway"] ?? ''; + $phonetype1 = $_GET["phonetype1"] ?? ''; + $phonetype2 = $_GET["phonetype2"] ?? ''; //get the call broadcast details from the database $sql = "select * from v_call_broadcasts "; @@ -88,7 +88,7 @@ $broadcast_start_time = $row["broadcast_start_time"]; $broadcast_timeout = $row["broadcast_timeout"]; $broadcast_concurrent_limit = $row["broadcast_concurrent_limit"]; - $recordingid = $row["recordingid"]; + $recordingid = $row["recordingid"] ?? ''; $broadcast_caller_id_name = $row["broadcast_caller_id_name"]; $broadcast_caller_id_number = $row["broadcast_caller_id_number"]; $broadcast_destination_type = $row["broadcast_destination_type"];