Skip to content

Commit

Permalink
Fixed PHP 5.6 'ob_gzhandler' conflict with 'zlib output compression'
Browse files Browse the repository at this point in the history
Fixed warning ob_start(): output handler 'ob_gzhandler' conflicts with
'zlib output compression' and no array or string given
  • Loading branch information
laukstein committed Sep 22, 2014
1 parent 5f7a641 commit 7becfca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion content/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@
// date.timezone settings required since PHP 5.3
if (version_compare($phpv, '5.3', '>=') && !ini_get('date.timezone')) date_default_timezone_set('Etc/GMT');
// Compress output with Gzip, PHP 5.4.4 bug https://bugs.php.net/bug.php?id=55544
if (version_compare($phpv, '5.4.5', '>') && !ob_start('ob_gzhandler')) ob_start();
if (version_compare($phpv, '5.4', '>') && extension_loaded('zlib')) {
ob_end_clean();
ob_start('ob_gzhandler');
}
} else {
$comp = false;
$fix .= "\n* upgrade to PHP 5.2 or later";
Expand Down

0 comments on commit 7becfca

Please sign in to comment.