Browse Source

verify Fixed the db test for php-silex

Mike Smith 11 years ago
parent
commit
03620e1dea
1 changed files with 4 additions and 0 deletions
  1. 4 0
      php-silex/web/index.php

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

@@ -32,6 +32,10 @@ $app->get('/db', function(Request $request) use ($app) {
         $worlds[] = $app['db']->fetchAssoc('SELECT * FROM World WHERE id = ?', array(mt_rand(1, 10000)));
     }
 
+    if (count($worlds) == 1) {
+        $worlds = $worlds[0];
+    }
+
     return new JsonResponse($worlds);
 });