8000 Redirection: Prevent HttpException when redirection is defined by Filoz · Pull Request #118 · bolt/forms · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Redirection: Prevent HttpException when redirection is defined #118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/EventSubscriber/Redirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Bolt\Log\LoggerTrait;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Tightenco\Collect\Support\Collection;

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

$response->send();
return;
}

throw new HttpException(Response::HTTP_FOUND, '', null, []);
Expand Down
0