diff --git a/api/profile.php b/api/profile.php index b41d2d1..33b31f5 100644 --- a/api/profile.php +++ b/api/profile.php @@ -963,7 +963,7 @@ class profile extends cora\crud { ], 'metadata' => [ 'generated_at' => date('c'), - 'duration' => round((time() - strtotime($first_timestamp)) / 86400), + 'duration' => $first_timestamp === null ? null : round((time() - strtotime($first_timestamp)) / 86400), ] ];