From 1f4402cd4c448571af68b9b694729f29f9ba45f0 Mon Sep 17 00:00:00 2001 From: Tsuyoshi Sadakata Date: Wed, 26 Nov 2014 17:25:10 +0900 Subject: [PATCH] check ob_get_level() before ob_flush() --- lib/Cake/Network/CakeResponse.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Cake/Network/CakeResponse.php b/lib/Cake/Network/CakeResponse.php index a1796ee80..bd5890e61 100644 --- a/lib/Cake/Network/CakeResponse.php +++ b/lib/Cake/Network/CakeResponse.php @@ -1507,7 +1507,9 @@ class CakeResponse { protected function _flushBuffer() { //@codingStandardsIgnoreStart @flush(); - @ob_flush(); + if (ob_get_level()) { + @ob_flush(); + } //@codingStandardsIgnoreEnd }