Browse Source

verify Fixed db, query, and update on php-phalcon

Mike Smith 11 years ago
parent
commit
e5e9b27b9e
1 changed files with 6 additions and 1 deletions
  1. 6 1
      php-phalcon/app/controllers/BenchController.php

+ 6 - 1
php-phalcon/app/controllers/BenchController.php

@@ -27,7 +27,12 @@ class BenchController extends \Phalcon\Mvc\Controller
             $worlds[] = Worlds::findFirst(mt_rand(1, 10000));
         }
 
-        return $this->sendContentAsJson($worlds);
+        if (count($worlds) == 1) {
+            return $this->sendContentAsJson($worlds[0]);
+        }
+        else {
+            return $this->sendContentAsJson($worlds);
+        }
     }
 
     public function fortunesAction() {