[BUGFIX] Endless loop in check for broken extensions 52/25152/2
authorOliver Hader <oliver@typo3.org>
Mon, 4 Nov 2013 13:02:43 +0000 (14:02 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Thu, 7 Nov 2013 09:15:56 +0000 (10:15 +0100)
The check for broken extensions in the Install Tool checks for
PHP fatal errors, excludes possibly faulty extensions and
continues this process until all errors are gone or all
extensions have been marked as broken.

If PHP warnings (or any other content) are outputted directly
to the client, this will lead to a mixed data representation of
JSON encoded content and the plain text output, like e.g.
  Warning:  array_keys() expects parameter 1 to be array...

To avoid that, the output buffer needs to be cleaned.

Change-Id: I7efb0be23e1897af4d98c7c7726eec2003fb6296
Fixes: #53236
Releases: 6.2
Reviewed-on: https://review.typo3.org/25152
Reviewed-by: Philipp Gampe
Reviewed-by: Markus Klein
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader

index 1941e4b..8cbb0c2 100644 (file)
@@ -171,6 +171,7 @@ class AjaxController extends AbstractController {
         * @param string $content Content to output
        protected function output($content = '') {
+               ob_clean();
                header('Content-Type: application/json; charset=utf-8');
                header('Cache-Control: no-cache, must-revalidate');
                header('Pragma: no-cache');