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:11:54 -06:00
committed by GitHub
parent 666b1351a3
commit 9066afb82a

View File

@@ -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;