Skip to content

Commit

Permalink
Presenter::restoreRequest() redirects on GET request
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Jan 22, 2020
1 parent 4a60713 commit c84fbf3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Application/UI/Presenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -1068,11 +1068,15 @@ public function restoreRequest(string $key): void
}
$request = clone $session[$key][1];
unset($session[$key]);
$request->setFlag(Application\Request::RESTORED, true);
$params = $request->getParameters();
$params[self::FLASH_KEY] = $this->getFlashKey();
$request->setParameters($params);
$this->sendResponse(new Responses\ForwardResponse($request));
if ($request->isMethod('POST')) {
$request->setFlag(Application\Request::RESTORED, true);
$this->sendResponse(new Responses\ForwardResponse($request));
} else {
$this->redirectUrl($this->requestToUrl($request));
}
}


Expand Down

0 comments on commit c84fbf3

Please sign in to comment.