From 69a5ce89de6658eafa974b19363b62a36ced4d43 Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Sun, 22 Jan 2023 07:20:55 -0500 Subject: [PATCH] Minor changes for PHP8 --- api/profile.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/profile.php b/api/profile.php index 466eaa2..b41d2d1 100644 --- a/api/profile.php +++ b/api/profile.php @@ -375,7 +375,10 @@ class profile extends cora\crud { // List of thermostat_ids that have data for this timestamp. $relevant_thermostat_ids = []; foreach($group_thermostats as $possible_relevant_thermostat) { - if(strtotime($possible_relevant_thermostat['data_begin']) <= $current_timestamp) { + if( + $possible_relevant_thermostat['data_begin'] === null || + strtotime($possible_relevant_thermostat['data_begin']) <= $current_timestamp + ) { $relevant_thermostat_ids[] = $possible_relevant_thermostat['thermostat_id']; } }