Skip to content

Commit

Permalink
Merge pull request #2 from databox/feature/disable-error-reporting-on…
Browse files Browse the repository at this point in the history
…-prod

Feature/Feature/disable error reporting on prod
  • Loading branch information
fuzin authored Jul 7, 2022
2 parents ebb161a + 22e8c83 commit 46be2fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Silex/EventListener/MiddlewareListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function onKernelRequest(GetResponseEvent $event)
{
$request = $event->getRequest();
$routeName = $request->attributes->get('_route');
if (!$route = $this->app['routes']->get($routeName)) {
if (null === $routeName || !$route = $this->app['routes']->get($routeName)) {
return;
}

Expand All @@ -71,7 +71,7 @@ public function onKernelResponse(FilterResponseEvent $event)
{
$request = $event->getRequest();
$routeName = $request->attributes->get('_route');
if (!$route = $this->app['routes']->get($routeName)) {
if (null === $routeName || !$route = $this->app['routes']->get($routeName)) {
return;
}

Expand Down

0 comments on commit 46be2fd

Please sign in to comment.