Browse Source

verify Fixed php-silex-orm's db test

Mike Smith 11 years ago
parent
commit
81aafa6769
1 changed files with 4 additions and 0 deletions
  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));
         $worlds[] =  $repo->find(mt_rand(1, 10000));
     }
     }
 
 
+    if ($queries == 1) {
+        $worlds = $worlds[0];
+    }
+
     return new JsonResponse($worlds);
     return new JsonResponse($worlds);
 });
 });