wzh 5 年 前
コミット
949a330a90
1 ファイル変更1 行追加1 行削除
  1. 1 1
      websocket/idcolWss.php

+ 1 - 1
websocket/idcolWss.php

@@ -158,7 +158,7 @@ $ws_worker->onWorkerStart = function($ws_worker)
                     $data = ['code'=>'0000','status'=>2,'msg'=>'Successful operation','data'=>['type'=>'updateDev','id'=>$v['lamp_id'],'step'=>100,'status'=>2,'number'=>$v['number']]];
                     unset($devUpdateList[$k]);
                 }
-                $v['client']->send(json_encode($data));
+                if (isset($data)) $v['client']->send(json_encode($data));
             }
         }
     });