diff --git a/app/fax_queue/fax_queue.php b/app/fax_queue/fax_queue.php index 7730b86cc0..75aa5f7ab1 100644 --- a/app/fax_queue/fax_queue.php +++ b/app/fax_queue/fax_queue.php @@ -55,7 +55,7 @@ } //process the http post data by action - if (!empty($action) && !empty($fax_queue) && is_array($fax_queue) && @sizeof($fax_queue) != 0) { + if (!empty($action) && !empty($fax_queue) && !empty($fax_queue)) { switch ($action) { case 'copy': @@ -79,7 +79,7 @@ } //redirect the user - header('Location: fax_queue.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: fax_queue.php'.(!empty($search) ? '?search='.urlencode($search) : null)); exit; } @@ -130,7 +130,7 @@ $sql .= ") "; $parameters['search'] = '%'.$search.'%'; } - if (isset($_GET["fax_status"]) && $_GET["fax_status"] != '') { + if (isset($_GET["fax_status"]) && !empty($_GET["fax_status"])) { $sql .= "and q.fax_status = :fax_status \n"; $parameters['fax_status'] = $_GET["fax_status"]; } @@ -139,7 +139,7 @@ unset($sql, $parameters); //prepare to page the results - $rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50; + $rows_per_page = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50; $param = !empty($search) ? "&search=".$search : null; $param = (!empty($_GET['show']) && $_GET['show'] == 'all' && permission_exists('fax_queue_all')) ? "&show=all" : null; $page = !empty($_GET['page']) && is_numeric($_GET['page']) ? $_GET['page'] : 0; @@ -207,7 +207,7 @@ $sql .= ") "; $parameters['search'] = '%'.$search.'%'; } - if (isset($_GET["fax_status"]) && $_GET["fax_status"] != '') { + if (isset($_GET["fax_status"]) && !empty($_GET["fax_status"])) { $sql .= "and q.fax_status = :fax_status \n"; $parameters['fax_status'] = $_GET["fax_status"]; } @@ -263,7 +263,7 @@ echo " \n"; echo ""; echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search']); - if ($paging_controls_mini != '') { + if (!empty($paging_controls_mini)) { echo "".$paging_controls_mini."\n"; } echo " \n"; @@ -314,7 +314,7 @@ } echo "\n"; - if (is_array($fax_queue) && @sizeof($fax_queue) != 0) { + if (!empty($fax_queue)) { $x = 0; foreach ($fax_queue as $row) { if (permission_exists('fax_queue_edit')) { @@ -336,7 +336,7 @@ echo " ".escape($row['fax_caller_id_name'])."\n"; echo " ".escape($row['fax_caller_id_number'])."\n"; echo " ".escape($row['fax_number'])."\n"; - echo " ".escape(str_replace(',', ' ', $row['fax_email_address']))."\n"; + echo " ".escape(str_replace(',', ' ', $row['fax_email_address'] ?? ''))."\n"; // echo " ".escape($row['fax_file'])."\n"; echo " ".ucwords($text['label-'.$row['fax_status']])."\n"; echo " ".escape($row['fax_retry_date_formatted'])." ".escape($row['fax_retry_time_formatted'])."\n";