wzh 5 yıl önce
ebeveyn
işleme
7d95b86089
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      api/application/controllers/Lampcontrol.php

+ 1 - 1
api/application/controllers/Lampcontrol.php

@@ -64,7 +64,7 @@ class Lampcontrol extends Base_Controller {
             $filter['AI.status'] = 0;
         }
         $alarmtype = $this->input->post('alarmtype', true);
-        if ($alarmtype !== '' && $alarmtype !== null) $filter['AI.alarmtype'] = $alarmtype;
+        if (!empty($alarmtype)) $filter['AI.alarmtype'] = $alarmtype;
         // 记录用户选择的字段
         if (!empty($field1)) {
             $fieldData = array('userid'=>$userid,'lampfield'=>$field1);