Преглед на файлове

fixed Controller::redirect must return the response

ornicar преди 14 години
родител
ревизия
4ed65d026e
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      src/Symfony/Bundle/FrameworkBundle/Controller.php

+ 3 - 1
src/Symfony/Bundle/FrameworkBundle/Controller.php

@@ -89,7 +89,9 @@ class Controller implements \ArrayAccess
      */
     public function redirect($url, $status = 302)
     {
-        return $this->container->get('response')->setRedirect($url, $status);
+        $response = $this->container->get('response');
+        $response->setRedirect($url, $status);
+        return $response;
     }
 
     /**