Changeset 15017
- Timestamp:
- 05/28/2010 12:18:00 AM (15 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/plugin.php
r14546 r15017 483 483 ob_start(); 484 484 include(WP_PLUGIN_DIR . '/' . $plugin); 485 if ( ob_get_length() > 0 ) {486 $output = ob_get_clean();487 return new WP_Error('unexpected_output', __('The plugin generated unexpected output.'), $output);488 }489 485 do_action( 'activate_plugin', trim( $plugin) ); 490 486 if ( $network_wide ) { … … 498 494 do_action( 'activate_' . trim( $plugin ) ); 499 495 do_action( 'activated_plugin', trim( $plugin) ); 496 if ( ob_get_length() > 0 ) { 497 $output = ob_get_clean(); 498 return new WP_Error('unexpected_output', __('The plugin generated unexpected output.'), $output); 499 } 500 500 ob_end_clean(); 501 501 } -
trunk/wp-admin/plugins.php
r14989 r15017 335 335 <?php if ( isset($_GET['error']) ) : 336 336 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 “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.'), $_GET['charsout']); 339 339 else 340 340 $errmsg = __('Plugin could not be activated because it triggered a <strong>fatal error</strong>.'); 341 342 341 ?> 343 342 <div id="message" class="updated"><p><?php echo $errmsg; ?></p> 344 343 <?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) ) { ?> 346 345 <iframe style="border:0" width="100%" height="70px" src="<?php echo admin_url('plugins.php?action=error_scrape&plugin=' . esc_attr($plugin) . '&_wpnonce=' . esc_attr($_GET['_error_nonce'])); ?>"></iframe> 347 346 <?php
Note: See TracChangeset
for help on using the changeset viewer.