Flush all output buffers during shutdown to avoid PHP 5 bustage. see #3354

git-svn-id: https://develop.svn.wordpress.org/trunk@5462 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2007-05-12 22:06:31 +00:00
parent d9da4028a2
commit fb8a712fdb
2 changed files with 8 additions and 1 deletions

View File

@ -173,7 +173,7 @@ add_action('sanitize_comment_cookies', 'sanitize_comment_cookies');
add_action('admin_print_scripts', 'wp_print_scripts', 20);
add_action('mce_options', '_mce_set_direction');
add_action('init', 'smilies_init', 5);
add_action( 'plugins_loaded', 'wp_maybe_load_widgets', 0 );
add_action( 'shutdown', 'wp_ob_end_flush_all', 1);
?>

View File

@ -1530,4 +1530,11 @@ function wp_widgets_add_menu() {
ksort($submenu['themes.php'], SORT_NUMERIC);
}
// For PHP 5.2, make sure all output buffers are flushed
// before our singletons our destroyed.
function wp_ob_end_flush_all()
{
while ( @ob_end_flush() );
}
?>