From: Sebastian Harl Date: Tue, 3 Apr 2012 11:06:51 +0000 (+0200) Subject: patches: Added 02-php5.4.diff -- use ob_end_flush() in favor of ob_end_clean() X-Git-Tag: libkohana2-php-2.3.4-2~6 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=db8d815246f8df7c32b944e941cc127354b2adfe;p=pkg-libkohana2-php.git patches: Added 02-php5.4.diff -- use ob_end_flush() in favor of ob_end_clean() … if the buffer contains any data to make sure the rendered page is actually displayed (PHP 5.4 handles end_clean() a bit different than previous versions). Thanks to Bernhard Schmidt for reporting this and Jörg Linge for tracking down to problem. Closes: #665197 --- diff --git a/debian/changelog b/debian/changelog index 2e5a52b..7822392 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +libkohana2-php (2.3.4-2) unstable; urgency=low + + * debian/patches: + - Added 02-php5.4.diff -- use ob_end_flush() in favor of ob_end_clean() if + the buffer contains any data to make sure the rendered page is actually + displayed (PHP 5.4 handles end_clean() a bit different than previous + versions); thanks to Bernhard Schmidt for reporting this and Jörg Linge + for tracking down to problem (Closes: #665197). + + -- Sebastian Harl Tue, 03 Apr 2012 13:03:53 +0200 + libkohana2-php (2.3.4-1) unstable; urgency=low [ Sven Velt ] diff --git a/debian/patches/02-php5.4.diff b/debian/patches/02-php5.4.diff new file mode 100644 index 0000000..99226aa --- /dev/null +++ b/debian/patches/02-php5.4.diff @@ -0,0 +1,26 @@ +Description: Fix for PHP 5.4. + PHP 5.4 seems to handle ob_end_clean() a bit different than previous + versions. +Author: Sebastian Harl + +--- a/system/core/Kohana.php ++++ b/system/core/Kohana.php +@@ -719,7 +719,17 @@ final class Kohana { + } + + // 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(); ++ } ++ } + } + } + diff --git a/debian/patches/series b/debian/patches/series index f591f78..3594cd9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ 01-font-path.diff +02-php5.4.diff