Commit 1c0cf77e authored by Oliver Bartsch's avatar Oliver Bartsch
Browse files

[BUGFIX] Prevent TypeError in ActionController

Ensure to properly typecast optional
parameters of throwStatus() before
passing them to type hinted methods.

Resolves: #97666
Releases: main, 11.5
Change-Id: Ifb6d43cffc97899cdd4ab72d48703bc3db23f0e1
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74735


Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Oliver Klee's avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
parent 45719077
......@@ -842,8 +842,8 @@ abstract class ActionController implements ControllerInterface
$content = $statusCode . ' ' . $statusMessage;
}
$response = $this->responseFactory
->createResponse((int)$statusCode, $statusMessage)
->withBody($this->streamFactory->createStream($content));
->createResponse((int)$statusCode, (string)$statusMessage)
->withBody($this->streamFactory->createStream((string)$content));
throw new PropagateResponseException($response, 1476045871);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment