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:
parent
887f252e2b
commit
a524a92003
@ -139,10 +139,14 @@ class runtime_thermostat_summary extends cora\crud {
|
|||||||
public function populate_backwards($thermostat_id) {
|
public function populate_backwards($thermostat_id) {
|
||||||
$thermostat = $this->api('thermostat', 'get', $thermostat_id);
|
$thermostat = $this->api('thermostat', 'get', $thermostat_id);
|
||||||
|
|
||||||
|
// If there's no data do nothing.
|
||||||
|
if ($thermostat['data_begin'] === null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$query = '
|
$query = '
|
||||||
select
|
select
|
||||||
min(`date`) `min_date`
|
min(`date`) `min_date`
|
||||||
#"2020-09-25" `min_date`
|
|
||||||
from
|
from
|
||||||
`runtime_thermostat_summary`
|
`runtime_thermostat_summary`
|
||||||
where
|
where
|
||||||
@ -163,7 +167,7 @@ class runtime_thermostat_summary extends cora\crud {
|
|||||||
$populate_begin = date('Y-m-d', $populate_begin);
|
$populate_begin = date('Y-m-d', $populate_begin);
|
||||||
$populate_end = date('Y-m-d', $populate_end);
|
$populate_end = date('Y-m-d', $populate_end);
|
||||||
|
|
||||||
return $this->populate($thermostat_id, $populate_begin, $populate_end);
|
$this->populate($thermostat_id, $populate_begin, $populate_end);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user