CDR - Details: Mitigate PHP 8.x warnings.

This commit is contained in:
fusionate
2024-05-13 10:27:34 -06:00
parent 1a9eaef5f3
commit 7556956763
2 changed files with 20 additions and 18 deletions

View File

@@ -1203,7 +1203,7 @@ if (!class_exists('xml_cdr')) {
}
//call centers
if ($app['application'] == 'call_centers') {
if (!empty($app['application']) && $app['application'] == 'call_centers') {
if (isset($row["caller_profile"]["transfer_source"])) {
$app['status'] = 'answered'; //Out
}
@@ -1213,22 +1213,22 @@ if (!class_exists('xml_cdr')) {
}
//call flows
if ($app['application'] == 'call_flows') {
if (!empty($app['application']) && $app['application'] == 'call_flows') {
$app['status'] = 'routed';
}
//conferences
if ($app['application'] == 'conferences') {
if (!empty($app['application']) && $app['application'] == 'conferences') {
$app['status'] = 'answered';
}
//destinations
if ($app['application'] == 'destinations') {
if (!empty($app['application']) && $app['application'] == 'destinations') {
$app['status'] = 'routed';
}
//extensions
if ($app['application'] == 'extensions') {
if (!empty($app['application']) && $app['application'] == 'extensions') {
if ($this->billsec == 0) {
$app['status'] = 'missed';
}
@@ -1238,7 +1238,7 @@ if (!class_exists('xml_cdr')) {
}
//ivr menus
if ($app['application'] == 'ivr_menus') {
if (!empty($app['application']) && $app['application'] == 'ivr_menus') {
$app['status'] = 'routed';
}
@@ -1254,12 +1254,12 @@ if (!class_exists('xml_cdr')) {
}
//ring groups
if ($app['application'] == 'ring_groups') {
if (!empty($app['application']) && $app['application'] == 'ring_groups') {
$app['status'] = 'waited';
}
//time conditions
if ($app['application'] == 'time_conditions') {
if (!empty($app['application']) && $app['application'] == 'time_conditions') {
$app['status'] = 'routed';
}
@@ -1295,12 +1295,12 @@ if (!class_exists('xml_cdr')) {
}
//conference
if ($app['application'] == 'conferences') {
if (!empty($app['application']) && $app['application'] == 'conferences') {
$skip_row = true;
}
//voicemails
if ($app['application'] == 'voicemails') {
if (!empty($app['application']) && $app['application'] == 'voicemails') {
$app['status'] = 'voicemail';
}
@@ -1331,7 +1331,7 @@ if (!class_exists('xml_cdr')) {
$call_flow_summary[$x]["destination_number"] = $row["caller_profile"]["destination_number"];
$call_flow_summary[$x]["destination_label"] = $app['label'];
$call_flow_summary[$x]["destination_status"] = $app['status'];
$call_flow_summary[$x]["destination_description"] = $app['description'];
$call_flow_summary[$x]["destination_description"] = $app['description'] ?? '';
//$call_flow_summary[$x]["application"] = $app;
//set the start and epoch

View File

@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2023
Portions created by the Initial Developer are Copyright (C) 2008-2024
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -447,7 +447,7 @@
echo " <td valign='top' class='".$row_style[$c]."'>".escape($row["start_stamp"])."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".escape($row["end_stamp"])."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".escape($row["duration_formatted"])."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".escape($text['label-'.$row["destination_status"]])."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".escape($text['label-'.$row["destination_status"]] ?? '')."</td>\n";
echo "</tr>\n";
//alternate $c
@@ -489,11 +489,13 @@
echo " <td valign='top' width='15%' class='".$row_style[$c]."'>".$vk."&nbsp;&nbsp;&nbsp;&nbsp;</td>\n";
echo " <td valign='top'>\n";
echo " <table border='0' cellpadding='0' cellspacing='0'>\n";
foreach ($arrays as $k => $v) {
echo " <tr>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$k."&nbsp;&nbsp;&nbsp;&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$v."</td>\n";
echo " </tr>\n";
if (!empty($arrays) && is_array($arrays)) {
foreach ($arrays as $k => $v) {
echo " <tr>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$k."&nbsp;&nbsp;&nbsp;&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$v."</td>\n";
echo " </tr>\n";
}
}
echo " </table>\n";
echo " <td>\n";