Make WordPress Core


Ignore:
Timestamp:
05/28/2010 12:18:00 AM (16 years ago)
Author:
ryan
Message:

Allow plugin activation even if plugin generates extra output. Make warning more informative. fixes #13585

File:
1 edited

Legend:

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

    r14989 r15017  
    335335<?php if ( isset($_GET['error']) ) :
    336336
    337         if (isset($_GET['charsout']))
    338                 $errmsg = sprintf(__('Plugin could not be activated because it generated %d characters of <strong>unexpected output</strong>.'), $_GET['charsout']);
     337        if ( isset($_GET['charsout']) )
     338                $errmsg = sprintf(__('The plugin generated %d characters of <strong>unexpected output</strong> during activation.  If you notice &#8220;headers already sent&#8221; messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.'), $_GET['charsout']);
    339339        else
    340340                $errmsg = __('Plugin could not be activated because it triggered a <strong>fatal error</strong>.');
    341 
    342341        ?>
    343342        <div id="message" class="updated"><p><?php echo $errmsg; ?></p>
    344343        <?php
    345                 if ( wp_verify_nonce($_GET['_error_nonce'], 'plugin-activation-error_' . $plugin) ) { ?>
     344                if ( !isset($_GET['charsout']) && wp_verify_nonce($_GET['_error_nonce'], 'plugin-activation-error_' . $plugin) ) { ?>
    346345        <iframe style="border:0" width="100%" height="70px" src="<?php echo admin_url('plugins.php?action=error_scrape&amp;plugin=' . esc_attr($plugin) . '&amp;_wpnonce=' . esc_attr($_GET['_error_nonce'])); ?>"></iframe>
    347346        <?php
Note: See TracChangeset for help on using the changeset viewer.