Przeglądaj źródła

verify Fixed php-silex-orm's db test

Mike Smith 12 lat temu
rodzic
commit
81aafa6769
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4 0
      php-silex-orm/web/index.php

+ 4 - 0
php-silex-orm/web/index.php

@@ -53,6 +53,10 @@ $app->get('/db', function(Request $request) use ($app) {
         $worlds[] =  $repo->find(mt_rand(1, 10000));
     }
 
+    if ($queries == 1) {
+        $worlds = $worlds[0];
+    }
+
     return new JsonResponse($worlds);
 });