diff --git a/api/runtime.php b/api/runtime.php index 570e33d..e29c014 100644 --- a/api/runtime.php +++ b/api/runtime.php @@ -77,7 +77,10 @@ class runtime extends cora\api { strtotime($thermostat['sync_begin']) <= strtotime('-1 year') ) || // For when merging thermostats and sync_begin is less than first_connected - strtotime($thermostat['sync_begin']) <= strtotime($thermostat['first_connected']) + ( + $thermostat['sync_begin'] !== null && + strtotime($thermostat['sync_begin']) <= strtotime($thermostat['first_connected']) + ) ) { $this->sync_forwards($thermostat_id);