mirror of
https://github.com/beestat/app.git
synced 2025-05-24 02:14:03 -04:00
Fixed #362 - Sensor temperature shows -17.8°C when battery dies.
This commit is contained in:
parent
583f99e0ea
commit
f84665ddd6
@ -508,8 +508,10 @@ final class database extends \mysqli {
|
|||||||
while($row = $result->fetch_assoc()) {
|
while($row = $result->fetch_assoc()) {
|
||||||
// Cast if necessary.
|
// Cast if necessary.
|
||||||
foreach($float_fields as $float_field) {
|
foreach($float_fields as $float_field) {
|
||||||
|
if($row[$float_field] !== null) {
|
||||||
$row[$float_field] = (float) $row[$float_field];
|
$row[$float_field] = (float) $row[$float_field];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
foreach($boolean_fields as $boolean_field) {
|
foreach($boolean_fields as $boolean_field) {
|
||||||
if($row[$boolean_field] !== null) {
|
if($row[$boolean_field] !== null) {
|
||||||
$row[$boolean_field] = (boolean) $row[$boolean_field];
|
$row[$boolean_field] = (boolean) $row[$boolean_field];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user