fly 4 år sedan
förälder
incheckning
7e4fdcca7d
1 ändrade filer med 2 tillägg och 2 borttagningar
  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)