[wp-hackers] Strange plugin fatal error

Jeremy Visser jeremy.visser at gmail.com
Wed Apr 2 10:59:49 GMT 2008


On Mon, 2008-03-31 at 23:42 +0100, Robert R. Marsh, SJ wrote:
> 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

This isn't a solution per se, but you could wrap your functions in
!function_exists() to suppress the error messages:

        if (!function_exists('similar_posts')) :
        function similar_posts() {
          // blah blah
        }
        endif;

-- 
Jeremy Visser                                 http://jeremy.visser.name/

()                           ascii ribbon campaign — against HTML e-mail
/\                                               http://asciiribbon.org/



More information about the wp-hackers mailing list