Problems ob_end_flush(): failed to send buffer of zlib output compression (0)
-
Hi, i had problems the with complinaz and wordpress.
The first time i have problem in function.php in WP for this error:Notice: ob_end_flush(): failed to send buffer of zlib output compression (0) in /home/vkgyhqwe/public_html/wp-includes/functions.php on line 4673
I’m resolved add this:
/**
* Proper ob_end_flush() for all levels
*
* This replaces the WordPresswp_ob_end_flush_all()
function
* with a replacement that doesn’t cause PHP notices.
*/
remove_action( ‘shutdown’, ‘wp_ob_end_flush_all’, 1 );
add_action( ‘shutdown’, function() {
while ( @ob_end_flush() );
} );But the problem for Complianz is: Notice: ob_end_flush(): failed to send buffer of zlib output compression (0) in /home/vkgyhqwe/public_html/wp-content/plugins/complianz-gdpr/class-cookie-blocker.php on line 83
I test at remove this code from class-cookie-blocker.php:
/**
* Flush the output buffer
*
* @since 1.0
*
* @access public
*
*/public function end_buffer() {
/**
* Don’t activate the cookie blocker is AMP is active, but the AMP integration is not enabled
*/if ( cmplz_is_amp_endpoint() && !cmplz_amp_integration_active() ) {
return;
}if ( ob_get_length() ) {
ob_end_flush();
}
}but now I have the problem bottom footer every page:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, class ‘cmplz_cookie_blocker’ does not have a method ‘end_buffer’ in /home/hidden/public_html/wp-includes/class-wp-hook.php on line 287
- The topic ‘Problems ob_end_flush(): failed to send buffer of zlib output compression (0)’ is closed to new replies.