From 06e8e5acdde85e3049be8a125d7d6bbf381b74b4 Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Sun, 22 Jan 2023 08:46:25 -0500 Subject: [PATCH] Minor changes for PHP8 --- api/profile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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), ] ];