File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -43,10 +43,10 @@ public function handle(HttpExceptionInterface $exception)
4343
4444 if ( ! $ response instanceof Response)
4545 {
46- $ response = new Response ($ response );
46+ $ response = new Response ($ response, $ exception -> getStatusCode () );
4747 }
4848
49- return $ response-> setStatusCode ( $ exception -> getStatusCode ()) ;
49+ return $ response ;
5050 }
5151 }
5252 }
@@ -95,4 +95,4 @@ public function getHandlers()
9595 return $ this ->handlers ;
9696 }
9797
98- }
98+ }
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ public function testExceptionHandlerHandlesException()
3535 {
3636 $ this ->exceptionHandler ->register (function (StubHttpException $ e )
3737 {
38- return new Illuminate \Http \Response ('foo ' );
38+ return new Illuminate \Http \Response ('foo ' , 404 );
3939 });
4040
4141 $ response = $ this ->exceptionHandler ->handle (new StubHttpException (404 , 'bar ' ));
@@ -60,4 +60,4 @@ public function testExceptionHandlerHandlesExceptionAndCreatesNewResponse()
6060 }
6161
6262
63- }
63+ }
You can’t perform that action at this time.
0 commit comments