Skip to content

Commit

Permalink
Module Tidy Output is corrupting avatar images Phorum#911
Browse files Browse the repository at this point in the history
  • Loading branch information
oricgn committed Aug 6, 2015
1 parent 5ee7925 commit 3b4a9e5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions common.php
Expand Up @@ -2173,9 +2173,12 @@ function phorum_ob_clean()
// Clear out all output that PHP buffered up to now.
for(;;) {
$status = ob_get_status();
if (!$status ||
$status['name'] == 'ob_gzhandler' ||
!isset($status['del'])) break;
if (empty($status) || $status === FALSE || $status['name'] == 'ob_gzhandler') break;
if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
if (!($status['flags'] & PHP_OUTPUT_HANDLER_REMOVABLE)) break;
} else {
if (!$status['del']) break;
}
ob_end_clean();
}
}
Expand Down

0 comments on commit 3b4a9e5

Please sign in to comment.