Prevent a count error

Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given
This commit is contained in:
FusionPBX
2025-07-07 18:12:53 -06:00
committed by GitHub
parent ec47489f4e
commit 8c34815726

View File

@@ -1446,7 +1446,7 @@ if (!class_exists('xml_cdr')) {
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;