Skip to content

Commit

Permalink
Merge ea032d8 into e1d4394
Browse files Browse the repository at this point in the history
  • Loading branch information
elazar committed Aug 28, 2014
2 parents e1d4394 + ea032d8 commit 41b607d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Whoops/Provider/Silex/WhoopsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Silex\Application;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\HttpException;
use RuntimeException;

class WhoopsServiceProvider implements ServiceProviderInterface
Expand Down Expand Up @@ -82,8 +83,9 @@ public function register(Application $app)
ob_start();
$app['whoops']->$method($e);
$response = ob_get_clean();
$code = $e instanceof HttpException ? $e->getStatusCode() : 500;

return new Response($response, 500);
return new Response($response, $code);
});

$app['whoops']->register();
Expand Down

0 comments on commit 41b607d

Please sign in to comment.