From abd2077ede9b36532b56aa29260ff435127e5a4d Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 15 Feb 2025 18:21:14 -0700 Subject: [PATCH] Send CDR with invalid xml to failed/invalid_xml --- app/xml_cdr/resources/classes/xml_cdr.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/xml_cdr/resources/classes/xml_cdr.php b/app/xml_cdr/resources/classes/xml_cdr.php index f6f5029897..358e1623f9 100644 --- a/app/xml_cdr/resources/classes/xml_cdr.php +++ b/app/xml_cdr/resources/classes/xml_cdr.php @@ -352,12 +352,12 @@ if (!class_exists('xml_cdr')) { //failed to load the XML, move the XML file to the failed directory if (!empty($xml_cdr_dir)) { - if (!file_exists($xml_cdr_dir.'/failed')) { - if (!mkdir($xml_cdr_dir.'/failed', 0660, true)) { + if (!file_exists($xml_cdr_dir.'/failed/invalid_xml')) { + if (!mkdir($xml_cdr_dir.'/failed/invalid_xml', 0660, true)) { die('Failed to create '.$xml_cdr_dir.'/failed'); } } - rename($xml_cdr_dir.'/'.$this->file, $xml_cdr_dir.'/failed/'.$this->file); + rename($xml_cdr_dir.'/'.$this->file, $xml_cdr_dir.'/failed/invalid_xml/'.$this->file); } //return without saving the invalid xml