diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 2ed1791a48..86080d677d 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -2657,7 +2657,9 @@ function wp_widgets_add_menu() { * @since 2.2.0 */ function wp_ob_end_flush_all() { - while ( @ob_end_flush() ); + $levels = ob_get_level(); + for ($i=0; $i<$levels; $i++) + ob_end_flush(); } /**