From f3b67dcee20fd2a118bee5b93584c652de4faf87 Mon Sep 17 00:00:00 2001 From: Luis Daniel Lucio Quiroz Date: Thu, 18 Apr 2019 13:58:34 -0400 Subject: [PATCH] [4.5] Fix CDR Details (#4052) Same as 4.4 --- app/xml_cdr/xml_cdr_details.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/xml_cdr/xml_cdr_details.php b/app/xml_cdr/xml_cdr_details.php index 73b6456259..3cf10ca9c8 100644 --- a/app/xml_cdr/xml_cdr_details.php +++ b/app/xml_cdr/xml_cdr_details.php @@ -69,7 +69,7 @@ } //get cdr from the file system - if ($format != "xml" || $format != "json") { + if ($format != "xml" && $format != "json") { $tmp_time = strtotime($start_stamp); $tmp_year = date("Y", $tmp_time); $tmp_month = date("M", $tmp_time); @@ -89,6 +89,10 @@ try { if ($format == 'json') { $array = json_decode($json_string,true); + if (is_null($array)){ + $j = stripslashes($json_string); + $array = json_decode($j,true); + } } if ($format == 'xml') { $array = json_decode(json_encode((array)simplexml_load_string($xml_string)),true);