From e80e8571adeffe93fd10bfe61e02eb865d3d2809 Mon Sep 17 00:00:00 2001 From: JoeChilds Date: Tue, 18 Jun 2013 23:03:44 +0100 Subject: [PATCH] Added output buffering to App::serve() to allow additional headers to be set at any point in the page generation. This fixes a bug with nesting one View inside another, caused by the View attempting to set a header when it renders --- Swiftlet/App.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Swiftlet/App.php b/Swiftlet/App.php index 7214196..4506809 100644 --- a/Swiftlet/App.php +++ b/Swiftlet/App.php @@ -114,7 +114,9 @@ public function run() */ public function serve() { + ob_start(); $this->view->render(); + ob_end_flush(); } /**