fly 4 年之前
父节点
当前提交
7e4fdcca7d
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/Jobs/Push/NewUserPushMsg.php

+ 2 - 2
app/Jobs/Push/NewUserPushMsg.php

@@ -97,7 +97,7 @@ class NewUserPushMsg implements ShouldQueue
     {
         $result = true;
         $conditions = json_decode($filter, true);
-        if ($conditions) {
+        if ($conditions && is_array($conditions)) {
             foreach ($conditions as $key => $value) {
                 $condition = $this->getCondition($key, $value);
                 if ($result && $condition) {
@@ -125,8 +125,8 @@ class NewUserPushMsg implements ShouldQueue
                     }
                 }
             }
-            return $result;
         }
+        return $result;
     }
 
     private function getCondition($key, $value)