From 29b341b5630584f849be820cd5277a8563cd6aac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rathgeber=20St=C3=A9phane?= Date: Tue, 8 Oct 2024 14:55:41 +0200 Subject: [PATCH] When timestamp is not defined --- src/Collector/Neo4jDataCollector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Collector/Neo4jDataCollector.php b/src/Collector/Neo4jDataCollector.php index 4099a5c..3e7531e 100644 --- a/src/Collector/Neo4jDataCollector.php +++ b/src/Collector/Neo4jDataCollector.php @@ -70,7 +70,7 @@ public function collect(Request $request, Response $response, ?\Throwable $excep $mergedArray = array_merge($successfulStatements, $failedStatements); uasort( $mergedArray, - static fn (array $a, array $b) => $a['start_time'] <=> $b['timestamp'] + static fn (array $a, array $b) => $a['start_time'] <=> ($b['timestamp'] ?? $b['start_time']) ); $this->data['statements'] = $mergedArray; }