Skip to content

Commit

Permalink
BUGFIX: Return correct response set in module controllers
Browse files Browse the repository at this point in the history
Previously the status code set in module actions via `throwStatus` or `response->setStatusCode()` was ignored.
With this change the individual module response is merged into the generic module response
which then contains the desired status code and other properties.
  • Loading branch information
Sebobo committed Jul 8, 2024
1 parent 59d4af2 commit 1c7ce04
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Neos.Neos/Classes/Controller/Backend/ModuleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public function indexAction(array $module)
$moduleResponse = new ActionResponse();

$this->dispatcher->dispatch($moduleRequest, $moduleResponse);
$moduleResponse->mergeIntoParentResponse($this->response);

if ($moduleResponse->getRedirectUri() !== null) {
$this->redirectToUri($moduleResponse->getRedirectUri(), 0, $moduleResponse->getStatusCode());
Expand Down

0 comments on commit 1c7ce04

Please sign in to comment.