From fb8d0e29833bfa48f176f8d402ca2c5f272be732 Mon Sep 17 00:00:00 2001 From: Alex <40072887+alexdcrane@users.noreply.github.com> Date: Mon, 5 Jun 2023 12:41:28 -0600 Subject: [PATCH] fix bugs in php 8.1 changes (#6744) * Update voicemail_greetings.php * Update recordings.php * Update recording_edit.php * Update phrases.php * Update phrase_edit.php * Update music_on_hold_edit.php * Update fax_queue.php * Update extensions.php * Update email_templates.php * Update email_queue_edit.php * Update dialplan_inbound_add.php * Update device_profiles.php * Update device_profile_copy.php * Update contact_address_edit.php * Update call_recordings.php * Update call_center_agent_edit.php * Update call_center_agents.php * Update call_center_queues.php * Update call_block.php * Update menu_edit.php * Update default_setting_edit.php * Update database_edit.php --- app/call_block/call_block.php | 2 +- app/call_centers/call_center_agent_edit.php | 4 ++-- app/call_centers/call_center_agents.php | 8 ++++---- app/call_centers/call_center_queues.php | 2 +- app/call_recordings/call_recordings.php | 2 +- app/contacts/contact_address_edit.php | 4 ++-- app/devices/device_profile_copy.php | 4 ++-- app/devices/device_profiles.php | 4 ++-- app/dialplan_inbound/dialplan_inbound_add.php | 2 +- app/email_queue/email_queue_edit.php | 4 ++-- app/email_templates/email_templates.php | 8 ++++---- app/extensions/extensions.php | 2 -- app/fax_queue/fax_queue.php | 4 +--- app/music_on_hold/music_on_hold_edit.php | 6 +++--- app/phrases/phrase_edit.php | 4 ++-- app/phrases/phrases.php | 2 +- app/recordings/recording_edit.php | 4 ++-- app/recordings/recordings.php | 2 +- app/voicemail_greetings/voicemail_greetings.php | 14 +++++++------- core/databases/database_edit.php | 2 +- core/default_settings/default_setting_edit.php | 4 ++-- core/menu/menu_edit.php | 2 +- 22 files changed, 43 insertions(+), 47 deletions(-) diff --git a/app/call_block/call_block.php b/app/call_block/call_block.php index d78493330d..82cfab03d3 100644 --- a/app/call_block/call_block.php +++ b/app/call_block/call_block.php @@ -135,7 +135,7 @@ //prepare to page the results $rows_per_page = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50; $param = "&search=".$search; - if (!empty($_GET['show']) == "all" && permission_exists('call_block_all')) { + if (!empty($_GET['show']) && $_GET['show'] == "all" && permission_exists('call_block_all')) { $param .= "&show=all"; } $page = $_GET['page'] ?? ''; diff --git a/app/call_centers/call_center_agent_edit.php b/app/call_centers/call_center_agent_edit.php index 2d70b00953..eb5b8bd241 100644 --- a/app/call_centers/call_center_agent_edit.php +++ b/app/call_centers/call_center_agent_edit.php @@ -52,7 +52,7 @@ $agent_password = ''; //check for duplicates - if (!empty($_GET["check"]) == 'duplicate') { + if (!empty($_GET["check"]) && $_GET["check"] == 'duplicate') { //agent id if (!empty($_GET["agent_id"])) { $sql = "select agent_name "; @@ -610,4 +610,4 @@ //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> diff --git a/app/call_centers/call_center_agents.php b/app/call_centers/call_center_agents.php index eec639110c..cccb771a86 100644 --- a/app/call_centers/call_center_agents.php +++ b/app/call_centers/call_center_agents.php @@ -88,7 +88,7 @@ //get total call center agent count from the database $sql = "select count(*) from v_call_center_agents "; $sql .= "where true "; - if (!empty($_GET['show']) != "all" || !permission_exists('call_center_all')) { + if (!empty($_GET['show']) && $_GET['show'] != "all" || !permission_exists('call_center_all')) { $sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) "; $parameters['domain_uuid'] = $_SESSION['domain_uuid']; } @@ -145,7 +145,7 @@ } echo "