Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I wouldn't recommend disabling the wp_ob_end_flush_all() function entirely, and I definitely wouldn't turn off zlib.output_compression in your php.ini file. Here's a better approach that replaces the source code causing the issue, and preserves the underlying functionality:
- /**
- * Proper ob_end_flush() for all levels
- *
- * This replaces the WordPress `wp_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() );
- } );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement