Added fallback for default $state

This commit is contained in:
laf
2014-06-19 22:36:07 +01:00
parent 32aaf9d94c
commit cfc1b7dcef

View File

@@ -29,6 +29,10 @@ else
{
$state = 0;
}
else
{
$state = 0;
}
$update = dbUpdate(array('sensor_alert' => $state), 'sensors', '`sensor_id` = ? AND `device_id` = ?', array($_POST['sensor_id'],$_POST['device_id']));
if(!empty($update) || $update == '0')
{