X-Git-Url: https://git.tokkee.org/?p=pkg-libkohana2-php.git;a=blobdiff_plain;f=debian%2Fpatches%2F02-php5.4.diff;fp=debian%2Fpatches%2F02-php5.4.diff;h=6d389d9a9a6819a8bacaa003974c9a94a42232e1;hp=99226aa3919fa6dd2b4d965ceb2d0dbf56befc42;hb=4dc140609ca6a13cd36cd7f95a3dce435bde9bc9;hpb=c9089cd3e2083b799e2480acfe8a0cb676284d4c diff --git a/debian/patches/02-php5.4.diff b/debian/patches/02-php5.4.diff index 99226aa..6d389d9 100644 --- a/debian/patches/02-php5.4.diff +++ b/debian/patches/02-php5.4.diff @@ -1,26 +1,31 @@ Description: Fix for PHP 5.4. PHP 5.4 seems to handle ob_end_clean() a bit different than previous versions. -Author: Sebastian Harl +Author: Sebastian Harl , Federico --- a/system/core/Kohana.php +++ b/system/core/Kohana.php -@@ -719,7 +719,17 @@ final class Kohana { +@@ -692,10 +692,9 @@ + Event::run('system.send_headers'); + } + +- self::$output = $output; +- +- // Set and return the final output +- return self::$output; ++ // Set the final output ++ self::$output = $output; ++ return TRUE; + } + + /** +@@ -719,7 +719,7 @@ } // Store the Kohana output buffer - ob_end_clean(); -+ if (($ob_len = ob_get_length()) !== FALSE) -+ { -+ if ($ob_len > 0) -+ { -+ ob_end_flush(); -+ } -+ else -+ { -+ ob_end_clean(); -+ } -+ } ++ ob_end_flush(); } } +