From 2ce369cb5046d46f3ff6efb8c40dc0f99f7ebf8f Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Sun, 25 Aug 2013 22:19:38 -0700 Subject: [PATCH] Flush existing output before the start method. --- flight/Engine.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/flight/Engine.php b/flight/Engine.php index 03e495b..006d375 100644 --- a/flight/Engine.php +++ b/flight/Engine.php @@ -273,6 +273,11 @@ class Engine { public function _start() { $dispatched = false; + // Flush any existing output + if (ob_get_length() > 0) { + $this->response()->write(ob_get_contents()); + } + // Enable output buffering ob_start();