mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-01 17:12:39 +00:00
Prevent response object being set as response body
This commit is contained in:
parent
89b1f32751
commit
484801ecf4
2 changed files with 47 additions and 1 deletions
|
@ -192,7 +192,9 @@ class Dispatcher implements CakeEventListener {
|
|||
|
||||
if ($render && $controller->autoRender) {
|
||||
$response = $controller->render();
|
||||
} elseif ($response->body() === null) {
|
||||
} elseif (!($result instanceof CakeResponse) &&
|
||||
$response->body() === null
|
||||
) {
|
||||
$response->body($result);
|
||||
}
|
||||
$controller->shutdownProcess();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue