소스 검색

[HttpKernel] fixed request management in HttpKernel

Fabien Potencier 14 년 전
부모
커밋
b3149a235b
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      src/Symfony/Component/HttpKernel/HttpKernel.php

+ 4 - 0
src/Symfony/Component/HttpKernel/HttpKernel.php

@@ -54,6 +54,8 @@ class HttpKernel implements HttpKernelInterface
             $response = $this->handleRaw($request, $type);
             $response = $this->handleRaw($request, $type);
         } catch (\Exception $e) {
         } catch (\Exception $e) {
             if (false === $catch) {
             if (false === $catch) {
+                $this->request = $previousRequest;
+
                 throw $e;
                 throw $e;
             }
             }
 
 
@@ -61,6 +63,8 @@ class HttpKernel implements HttpKernelInterface
             $event = new Event($this, 'core.exception', array('request_type' => $type, 'request' => $request, 'exception' => $e));
             $event = new Event($this, 'core.exception', array('request_type' => $type, 'request' => $request, 'exception' => $e));
             $this->dispatcher->notifyUntil($event);
             $this->dispatcher->notifyUntil($event);
             if (!$event->isProcessed()) {
             if (!$event->isProcessed()) {
+                $this->request = $previousRequest;
+
                 throw $e;
                 throw $e;
             }
             }