[wp-trac] [WordPress Trac] #7671: Plugin fatal error yields irrelevant error message from WordPress

WordPress Trac wp-trac at lists.automattic.com
Tue Sep 2 20:08:05 GMT 2008


#7671: Plugin fatal error yields irrelevant error message from WordPress
---------------------+------------------------------------------------------
 Reporter:  omry     |       Owner:  anonymous
     Type:  defect   |      Status:  new      
 Priority:  normal   |   Milestone:  2.8      
Component:  General  |     Version:  2.6      
 Severity:  normal   |    Keywords:           
---------------------+------------------------------------------------------
 The following plugin demonstrates the problem.
 it dies with the error '123', but wp 2.6 outputs the following gem:

 {{{
 Fatal error: Cannot redeclare bogus_activate() (previously declared in
 /home/omry/dev/php/wp/2.6/wp-content/plugins/hello.php:13) in
 /home/omry/dev/php/wp/2.6/wp-content/plugins/hello.php on line 13
 }}}

 {{{
 <?php
 /*
 Plugin Name: Bogus plugin
 Plugin URI: bogus.org
 Description: The bogus plugin from hell
 Author: Ya
 Version: 666.6
 Author URI: nope.org
 */

 $plugin_name = substr(__FILE__, strlen(ABSPATH . PLUGINDIR . '/'));
 add_action("activate_$plugin_name",'bogus_activate');
 function bogus_activate(){die('123');}


 ?>
 }}}

-- 
Ticket URL: <http://trac.wordpress.org/ticket/7671>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list