Changeset 5462

Show
Ignore:
Timestamp:
05/12/07 22:06:31 (1 year ago)
Author:
ryan
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/default-filters.php

    r5363 r5462  
    174174add_action('mce_options', '_mce_set_direction'); 
    175175add_action('init', 'smilies_init', 5); 
    176  
    177176add_action( 'plugins_loaded', 'wp_maybe_load_widgets', 0 ); 
     177add_action( 'shutdown', 'wp_ob_end_flush_all', 1); 
    178178 
    179179?> 
  • trunk/wp-includes/functions.php

    r5460 r5462  
    15311531} 
    15321532 
     1533// For PHP 5.2, make sure all output buffers are flushed 
     1534// before our singletons our destroyed. 
     1535function wp_ob_end_flush_all() 
     1536{ 
     1537    while ( @ob_end_flush() ); 
     1538} 
     1539 
    15331540?>