[wp-hackers] Strange plugin fatal error

DD32 wordpress at dd32.id.au
Mon Mar 31 22:51:41 GMT 2008


That happens when you try to activate an allready active plugin..
It can also happen when the activation suceeds, yet the plugin has  
outputted some content on the activtion call, or issued a die(), and it  
redirects back to the fatal error page.. At which point the plugin is  
actually active.

Changing the include()'s to include_once() in activate_plugins might  
resolve that issue.. But would make some people rather confused when it  
claims not to have activated, yet its activated.

On Tue, 01 Apr 2008 09:42:16 +1100, Robert R. Marsh, SJ  
<rmarshsj at hotmail.com> wrote:

> Out of hundreds of downloads in the last few days of the latest version  
> of
> my Similar Posts plugin  
> (http://wordpress.org/extend/plugins/similar-posts/)
> I have maybe five reports of a strange fatal error that interrupts plugin
> activation.
>
> The error message is like:
>
> Fatal error: Cannot redeclare similar_posts() (previously declared in
> /blah/blah/blog/wordpress/wp-content/plugins/similar-posts/similar-posts.php
> :33) in
> /blah/blah/blog/wordpress/wp-content/plugins/similar-posts/similar-posts.php
> on line 33
>
> Has anyone seen anything like this before? I can't see anything  
> obviously in
> common between the reporters either  -- both WP 2.3.3 and 2.5 seem to be
> affected so I'm guessing I've made a mistake somewhere.
>
> Rob Marsh, sj
> http://rmarsh.com
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>




More information about the wp-hackers mailing list