1
0
mirror of https://github.com/beestat/app.git synced 2025-07-09 03:04:07 -04:00

Minor changes for PHP8

This commit is contained in:
Jon Ziebell 2023-01-22 07:20:55 -05:00
parent 65f88a6624
commit 69a5ce89de

View File

@ -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'];
}
}