소스 검색

add is_array($event)

visuddhinanda 2 년 전
부모
커밋
a266b0c84e
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      app/Console/Commands/MqDiscussion.php

+ 6 - 1
app/Console/Commands/MqDiscussion.php

@@ -87,7 +87,12 @@ class MqDiscussion extends Command
                                     ->get();
                     foreach ($webhooks as $key => $hook) {
                         $event = json_decode($hook->event);
-                        if(!in_array('discussion',$event)){
+
+                        if(is_array($event)){
+                            if(!in_array('discussion',$event)){
+                                continue;
+                            }
+                        }else{
                             continue;
                         }
                         $command = '';