99226aa3919fa6dd2b4d965ceb2d0dbf56befc42
1 Description: Fix for PHP 5.4.
2 PHP 5.4 seems to handle ob_end_clean() a bit different than previous
3 versions.
4 Author: Sebastian Harl <tokkee@debian.org>
6 --- a/system/core/Kohana.php
7 +++ b/system/core/Kohana.php
8 @@ -719,7 +719,17 @@ final class Kohana {
9 }
11 // Store the Kohana output buffer
12 - ob_end_clean();
13 + if (($ob_len = ob_get_length()) !== FALSE)
14 + {
15 + if ($ob_len > 0)
16 + {
17 + ob_end_flush();
18 + }
19 + else
20 + {
21 + ob_end_clean();
22 + }
23 + }
24 }
25 }