Browse Source

verify Fixed kohana's db test

Mike Smith 11 years ago
parent
commit
33c7dd72e9
1 changed files with 4 additions and 0 deletions
  1. 4 0
      php-kohana/application/classes/Controller/Bench.php

+ 4 - 0
php-kohana/application/classes/Controller/Bench.php

@@ -24,6 +24,10 @@ Class Controller_Bench extends Controller
             $worlds[] = $query->param(':id', mt_rand(1, 10000))->execute()->current();
             $worlds[] = $query->param(':id', mt_rand(1, 10000))->execute()->current();
         }
         }
 
 
+        if ($queries == 1) {
+            $worlds = $worlds[0];
+        }
+
         $this->response
         $this->response
             ->headers(array('Content-Type' => 'application/json'))
             ->headers(array('Content-Type' => 'application/json'))
             ->body(json_encode($worlds));
             ->body(json_encode($worlds));