Skip to content

Commit de2c155

Browse files
authored
Merge pull request #118 from Filoz/patch-2
Redirection: Prevent HttpException when redirection is defined
2 parents 9866b6e + 3e6858c commit de2c155

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/EventSubscriber/Redirect.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Bolt\Log\LoggerTrait;
1010
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
1111
use Symfony\Component\HttpFoundation\RedirectResponse;
12+
use Symfony\Component\HttpKernel\Exception\HttpException;
1213
use Tightenco\Collect\Support\Collection;
1314

1415
class Redirect implements EventSubscriberInterface
@@ -47,6 +48,7 @@ public function redirect(): void
4748
$response = $this->getRedirectResponse($this->feedback->get('redirect'));
4849

4950
$response->send();
51+
return;
5052
}
5153

5254
throw new HttpException(Response::HTTP_FOUND, '', null, []);

0 commit comments

Comments
 (0)