From 720181c777c1f93980869ed20f019e643addd401 Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Sun, 22 Jan 2023 09:00:00 -0500 Subject: [PATCH] Minor changes for PHP8 --- api/runtime_thermostat_summary.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/runtime_thermostat_summary.php b/api/runtime_thermostat_summary.php index 6892e4e..6b31d11 100755 --- a/api/runtime_thermostat_summary.php +++ b/api/runtime_thermostat_summary.php @@ -115,7 +115,11 @@ class runtime_thermostat_summary extends cora\crud { $row = $result->fetch_assoc(); if($row['max_date'] === null) { - $populate_begin = strtotime($thermostat['data_begin']); // Just grab everything + if($thermostat['data_begin'] === null) { + $populate_begin = strtotime($thermostat['first_connected']); + } else { + $populate_begin = strtotime($thermostat['data_begin']); // Just grab everything + } } else { $populate_begin = strtotime($row['max_date']); }