diff --git a/app/call_centers/call_center_queue_edit.php b/app/call_centers/call_center_queue_edit.php index b3f111edae..309565502c 100644 --- a/app/call_centers/call_center_queue_edit.php +++ b/app/call_centers/call_center_queue_edit.php @@ -818,7 +818,7 @@ echo "\n"; echo "\n"; - if (permission_exists('call_center_tier_view') && !empty($agents)) { + if (permission_exists('call_center_tier_view') && !empty($agents) && is_array($agents)) { echo ""; echo " ".$text['label-agents'].""; echo " "; @@ -830,7 +830,7 @@ echo " \n"; echo " \n"; $x = 0; - if (!empty($tiers)) { + if (is_array($tiers)) { foreach($tiers as $field) { echo " \n"; echo " "; diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php index 2183de0b73..fefe5189b3 100644 --- a/app/destinations/destination_edit.php +++ b/app/destinations/destination_edit.php @@ -66,7 +66,7 @@ //get total destination count from the database, check limit, if defined if (!permission_exists('destination_domain')) { if ($action == 'add') { - if ($_SESSION['limit']['destinations']['numeric'] != '') { + if (!empty($_SESSION['limit']['destinations']['numeric'])) { $sql = "select count(*) from v_destinations where domain_uuid = :domain_uuid "; $parameters['domain_uuid'] = $_SESSION['domain_uuid']; $database = new database; @@ -1071,7 +1071,7 @@ $select_style = $select_style ?? ''; //pre-populate the form - if (!empty($_GET["id"]) > 0 && empty($_POST["persistformvar"])) { + if (!empty($_GET["id"]) && empty($_POST["persistformvar"])) { if (is_uuid($_GET["id"])) { $destination_uuid = $_GET["id"]; $sql = "select * from v_destinations "; diff --git a/app/xml_cdr/resources/classes/xml_cdr.php b/app/xml_cdr/resources/classes/xml_cdr.php index d84ddf3361..3db34605fd 100644 --- a/app/xml_cdr/resources/classes/xml_cdr.php +++ b/app/xml_cdr/resources/classes/xml_cdr.php @@ -1383,6 +1383,7 @@ if (!class_exists('xml_cdr')) { header("Content-Length: ".filesize($record_file)); } ob_clean(); + fpassthru($fd); //content-range if (isset($_SERVER['HTTP_RANGE']) && $_GET['t'] != "bin") { diff --git a/app/xml_cdr/xml_cdr_inc.php b/app/xml_cdr/xml_cdr_inc.php index d79c01ef91..1c21693294 100644 --- a/app/xml_cdr/xml_cdr_inc.php +++ b/app/xml_cdr/xml_cdr_inc.php @@ -218,7 +218,7 @@ */ //limit the number of results - if ($_SESSION['cdr']['limit']['numeric'] > 0) { + if (!empty($_SESSION['cdr']['limit']['numeric']) && $_SESSION['cdr']['limit']['numeric'] > 0) { $num_rows = $_SESSION['cdr']['limit']['numeric']; }