Sevajol Bastien před 11 roky
rodič
revize
7452204ebc
1 změnil soubory, kde provedl 8 přidání a 11 odebrání
  1. 8 11
      src/Muzich/CoreBundle/lib/Api/Response.php

+ 8 - 11
src/Muzich/CoreBundle/lib/Api/Response.php Zobrazit soubor

@@ -30,23 +30,20 @@ class Response
30 30
       }
31 31
     }
32 32
     
33
-    if ($content)
33
+    if (array_key_exists($searched, $content))
34 34
     {
35
-      if (array_key_exists($searched, $content))
35
+      if ($not_empty)
36 36
       {
37
-        if ($not_empty)
37
+        if ((is_null($content[$searched]) || !count($content[$searched]) || !$content[$searched]) && ($content[$searched] !== 0 && $content[$searched] !== '0'))
38 38
         {
39
-          if ((is_null($content[$searched]) || !count($content[$searched]) || !$content[$searched]) && ($content[$searched] !== 0 && $content[$searched] !== '0'))
39
+          return false;
40
+        }
41
+        if (is_string($content[$searched]))
42
+        {
43
+          if (trim($content[$searched]) == '')
40 44
           {
41 45
             return false;
42 46
           }
43
-          if (is_string($content[$searched]))
44
-          {
45
-            if (trim($content[$searched]) == '')
46
-            {
47
-              return false;
48
-            }
49
-          }
50 47
         }
51 48
       }
52 49