From 52213e9389bc3850641f95fc21e987fbf673a069 Mon Sep 17 00:00:00 2001 From: Matthias Glaub Date: Fri, 12 Feb 2021 17:04:55 +0100 Subject: [PATCH] Update LegacyController.php prepend output buffer also when a ViewModel or Response is returned --- src/MaglLegacyApplication/Controller/LegacyController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/MaglLegacyApplication/Controller/LegacyController.php b/src/MaglLegacyApplication/Controller/LegacyController.php index b7b2ff0..d8f2362 100644 --- a/src/MaglLegacyApplication/Controller/LegacyController.php +++ b/src/MaglLegacyApplication/Controller/LegacyController.php @@ -122,6 +122,9 @@ private function runScript($scriptFileName) $output = ob_get_clean(); if ($result instanceof ViewModel || $result instanceof Response) { + if ($this->options->getPrependOutputBufferToResponse()) { + echo $output; + } return $result; }