From 9066afb82af5142f1911e431778774e3b5e84af8 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 7 Jul 2025 18:11:54 -0600 Subject: [PATCH] Prevent a count error Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given --- app/xml_cdr/resources/classes/xml_cdr.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/xml_cdr/resources/classes/xml_cdr.php b/app/xml_cdr/resources/classes/xml_cdr.php index a76f997321..82b2836c38 100644 --- a/app/xml_cdr/resources/classes/xml_cdr.php +++ b/app/xml_cdr/resources/classes/xml_cdr.php @@ -1499,7 +1499,7 @@ unset($x); //set the last status to match the call detail record - $call_flow_summary[count($call_flow_summary)-1]['destination_status'] = $this->status; + $call_flow_summary[count($call_flow_summary ?? [])-1]['destination_status'] = $this->status; //return the call flow summary array return $call_flow_summary;