Changeset 5239

Show
Ignore:
Timestamp:
04/11/07 03:23:23 (2 years ago)
Author:
rob1n
Message:

Don't die because of output by badly-written plugins upon activation. Props masquerade. fixes #4127

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/plugins.php

    r5207 r5239  
    1313        if (!in_array($plugin, $current)) { 
    1414            wp_redirect('plugins.php?error=true'); // we'll override this later if the plugin can be included without fatal error 
     15            ob_start(); 
    1516            @include(ABSPATH . PLUGINDIR . '/' . $plugin); 
    1617            $current[] = $plugin; 
     
    1819            update_option('active_plugins', $current); 
    1920            do_action('activate_' . $plugin); 
     21            ob_end_clean(); 
    2022        } 
    2123        wp_redirect('plugins.php?activate=true'); // overrides the ?error=true one above