[BUGIFX] Extra output blocks backend thumbnails 05/19005/2
authorFrancois Suter <francois@typo3.org>
Mon, 18 Mar 2013 08:55:10 +0000 (09:55 +0100)
committerFrancois Suter <francois@typo3.org>
Mon, 18 Mar 2013 09:07:17 +0000 (10:07 +0100)
If some inclusion causes output when viewing image thumbnails
in the backend, the output will be broken. Adding a call to
ob_clean() ensures that this does not happen.

Resolves: #31953
Releases: 4.5, 4.7
Reviewed-on: https://review.typo3.org/19004
Reviewed-by: Francois Suter
Tested-by: Francois Suter
Change-Id: Ic540939d2a39b0adeb4427a6e772ad506686378d
Reviewed-on: https://review.typo3.org/19005

t3lib/thumbs.php

index 97fb6d3..b6fdab5 100644 (file)
@@ -202,8 +202,9 @@ class SC_t3lib_thumbs {
         */
        function main() {
                global $TYPO3_CONF_VARS;
-
-                       // If file exists, we make a thumbsnail of the file.
+                       // Clean output buffer to ensure no extraneous output exists
+               ob_clean();
+                       // If file exists, we make a thumbnail of the file.
                if ($this->input && file_exists($this->input))  {
 
                                // Check file extension: