mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-05 21:09:40 +00:00
Flush all output buffers during shutdown to avoid PHP 5 bustage. fixes #3354 for 2.2
git-svn-id: http://svn.automattic.com/wordpress/branches/2.2@5463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a885d5be4f
commit
fa3e76d676
@ -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);
|
||||
|
||||
?>
|
@ -1511,4 +1511,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() );
|
||||
}
|
||||
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user