fly 4 years ago
parent
commit
7e4fdcca7d
1 changed files with 2 additions and 2 deletions
  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;
         $result = true;
         $conditions = json_decode($filter, true);
         $conditions = json_decode($filter, true);
-        if ($conditions) {
+        if ($conditions && is_array($conditions)) {
             foreach ($conditions as $key => $value) {
             foreach ($conditions as $key => $value) {
                 $condition = $this->getCondition($key, $value);
                 $condition = $this->getCondition($key, $value);
                 if ($result && $condition) {
                 if ($result && $condition) {
@@ -125,8 +125,8 @@ class NewUserPushMsg implements ShouldQueue
                     }
                     }
                 }
                 }
             }
             }
-            return $result;
         }
         }
+        return $result;
     }
     }
 
 
     private function getCondition($key, $value)
     private function getCondition($key, $value)