浏览代码

Fix dbAction single world type 1 symfony-stripped

same fix as on symfony2 not stripped
Arnaud Kleinpeter 11 年之前
父节点
当前提交
43c8aa2926
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      php-symfony2-stripped/src/Skamander/BenchmarkBundle/Controller/BenchController.php

+ 2 - 2
php-symfony2-stripped/src/Skamander/BenchmarkBundle/Controller/BenchController.php

@@ -27,11 +27,11 @@ class BenchController extends Controller
         $repo = $this->getDoctrine()
             ->getRepository('SkamanderBenchmarkBundle:World');
 
-        for($i = 0; $i < $queries; ++$i) {
+        for ($i = 0; $i < $queries; ++$i) {
             $worlds[] =  $repo->find(mt_rand(1, 10000));
         }
 
-        if ($queries == 1) {
+        if ($queries == 1 && !$request->query->has('queries')) {
             $worlds = $worlds[0];
         }