I don't have any problem on localhost. but when i tested my codes on server, end of every page i see this notice.
my code:
<?php
ob_start();
include 'view.php';
$data = ob_get_contents();
ob_end_clean();
include 'master.php';
ob_end_flush(); // Problem is this line
WordPress attempts to flush the output buffers on shutdown. It fails because you have already called ob_end_flush()
.
You should be able to keep compression on, and simply unhook the flush action:
remove_action( 'shutdown', 'wp_ob_end_flush_all', 1 );
You can now call ob_end_flush()
manually, and keep zlib compression on.