Skip to content
This repository was archived by the owner on May 8, 2025. It is now read-only.

Commit 1d41d9a

Browse files
committed
handle arrays of $last_event_timestamp
1 parent 476972e commit 1d41d9a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/phpFITFileAnalysis.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2703,6 +2703,9 @@ private function processHrMessages()
27032703

27042704
// Manually scale timestamps (i.e. divide by 1024)
27052705
$last_event_timestamp = $this->data_mesgs['hr']['event_timestamp'];
2706+
if (is_array($last_event_timestamp)) {
2707+
$last_event_timestamp = $last_event_timestamp[0];
2708+
}
27062709
$start_timestamp = $this->data_mesgs['hr']['timestamp'] - $last_event_timestamp / 1024.0;
27072710
$timestamps[] = $last_event_timestamp / 1024.0;
27082711

0 commit comments

Comments
 (0)