Fixed bug #13427: t3lib_div::cleanOutputBuffers() might loop forever
authorDmitry Dulepov <dmitry.dulepov@gmail.com>
Thu, 29 Jul 2010 13:18:16 +0000 (13:18 +0000)
committerDmitry Dulepov <dmitry.dulepov@gmail.com>
Thu, 29 Jul 2010 13:18:16 +0000 (13:18 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8445 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_div.php
typo3/sysext/openid/class.tx_openid_return.php

index 1709486..9e0e4fb 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-07-29  Dmitry Dulepov  <dmitry@typo3.org>
+
+       * Fixed bug #13427: t3lib_div::cleanOutputBuffers() might loop forever (thanks to Stephan Seitz and Steffen Gebert)
+
 2010-07-28  Oliver Hader  <oliver@typo3.org>
 
        * Raised Extbase and Fluid from 1.2.0 to 1.2.1
index a20baaa..d8491e4 100644 (file)
@@ -6012,9 +6012,7 @@ final class t3lib_div {
         * @return      void
         */
        public static function cleanOutputBuffers() {
-               while (ob_get_level()) {
-                       ob_end_clean();
-               }
+               while (ob_end_clean());
                header('Content-Encoding: None', TRUE);
        }
 
@@ -6027,9 +6025,7 @@ final class t3lib_div {
        public static function flushOutputBuffers() {
                $obContent = '';
 
-               while (ob_get_level()) {
-                       $obContent .= ob_get_clean();
-               }
+               while ($obContent .= ob_get_clean());
 
                        // if previously a "Content-Encoding: whatever" has been set, we have to unset it
                if (!headers_sent()) {
index 0ec8a75..5c9b5aa 100644 (file)
@@ -57,9 +57,7 @@ class tx_openid_return {
        */
        public function main() {
                if ($GLOBALS['BE_USER']->user['uid']) {
-                       while (ob_get_level()>0) {
-                               @ob_end_clean();
-                       }
+                       t3lib_div::cleanOutputBuffers();
                        $backendURL = t3lib_div::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir . 'backend.php';
                        t3lib_utility_Http::redirect($backendURL);
                }