diff --git a/app/call_centers/call_center_queue_edit.php b/app/call_centers/call_center_queue_edit.php index da8b4af44b..b3f111edae 100644 --- a/app/call_centers/call_center_queue_edit.php +++ b/app/call_centers/call_center_queue_edit.php @@ -559,7 +559,7 @@ //add an empty row to the tiers array if (count($tiers) == 0) { - $rows = $_SESSION['call_center']['agent_add_rows']['numeric']; + $rows = $_SESSION['call_center']['agent_add_rows']['numeric'] ?? null; $id = 0; } if (count($tiers) > 0) { diff --git a/app/call_centers/call_center_queues.php b/app/call_centers/call_center_queues.php index fe329e1427..325707b8dc 100644 --- a/app/call_centers/call_center_queues.php +++ b/app/call_centers/call_center_queues.php @@ -53,14 +53,14 @@ $list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false'; //get posted data - if (!empty($_POST['call_center_queues'])) { + if (!empty($_POST['call_center_queues']) && is_array($_POST['call_center_queues'])) { $action = $_POST['action']; $search = $_POST['search']; $call_center_queues = $_POST['call_center_queues']; } //process the http post data by action - if (!empty($action) && !empty($call_center_queues)) { + if (!empty($action) && is_array($call_center_queues) && @sizeof($call_center_queues) != 0) { switch ($action) { case 'copy': if (permission_exists('call_center_queue_add')) { @@ -97,7 +97,7 @@ //get total call center queues count from the database $sql = "select count(*) from v_call_center_queues "; $sql .= "where true "; - if (!empty($_GET['show']) && $_GET['show'] != "all" || !permission_exists('call_center_all')) { + if ($show != "all" || !permission_exists('call_center_all')) { $sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) "; $parameters['domain_uuid'] = $_SESSION['domain_uuid']; } diff --git a/app/call_forward/call_forward_edit.php b/app/call_forward/call_forward_edit.php index 5a3e8c89ea..0139155f7c 100644 --- a/app/call_forward/call_forward_edit.php +++ b/app/call_forward/call_forward_edit.php @@ -85,7 +85,7 @@ $parameters['domain_uuid'] = $_SESSION['domain_uuid']; $parameters['extension_uuid'] = $extension_uuid; $database = new database; - $row = $database->select($sql, $parameters ?? null, 'row'); + $row = $database->select($sql, $parameters, 'row'); if (!empty($row)) { $extension = $row["extension"]; $number_alias = $row["number_alias"]; @@ -478,7 +478,7 @@ $sql .= "order by follow_me_order asc "; $parameters['follow_me_uuid'] = $follow_me_uuid; $database = new database; - $result = $database->select($sql, $parameters ?? null, 'all'); + $result = $database->select($sql, $parameters, 'all'); unset($destinations); foreach ($result as $x => &$row) { @@ -507,7 +507,7 @@ $sql .= "order by extension, number_alias asc "; $parameters['domain_uuid'] = $_SESSION['domain_uuid']; $database = new database; - $extensions = $database->select($sql, $parameters ?? null, 'all'); + $extensions = $database->select($sql, $parameters, 'all'); unset($sql, $parameters, $row); //set the default @@ -517,7 +517,7 @@ } //prepare the autocomplete - if(!empty($_SESSION['follow_me']['follow_me_autocomplete']['boolean']) == 'true') { + if(!empty($_SESSION['follow_me']['follow_me_autocomplete']['boolean']) && $_SESSION['follow_me']['follow_me_autocomplete']['boolean'] == 'true') { echo "\n"; echo "\n"; echo "