1
0
mirror of https://github.com/beestat/app.git synced 2025-05-24 02:14:03 -04:00

Minor changes for PHP8

This commit is contained in:
Jon Ziebell 2023-01-22 09:01:33 -05:00
parent 720181c777
commit 06f907bade

View File

@ -517,7 +517,7 @@ class thermostat extends cora\crud {
// Get all the scores from the other thermostats
while($other_thermostat = $result->fetch_assoc()) {
$other_thermostat['profile'] = json_decode($other_thermostat['profile'], true);
$other_thermostat['profile'] = $other_thermostat['profile'] === null ? null : json_decode($other_thermostat['profile'], true);
// Only use profiles with at least a year of data
// Only use profiles generated in the past year
if(