WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] "Redefining already defined constructor for class WP_Widget" (3 posts)

  1. jcartland
    Member
    Posted 11 months ago #

    Running PHP 5.4.9-4ubuntu2, on 13.04 64 bit. I've been regularly updating the nightly, and just encountered my first debug message, in 3.6-beta3-24284.

    Made it stop by editing wp-includes/widgets.php, after line 71. Moved the PHP5 constructor to before the PHP4 constructor. Seems to be working, although I don't really understand why. (Or even why there's a PHP4 constructor in the mix?)

  2. Sergey Biryukov
    Trac Moderator
    Posted 11 months ago #

  3. Sergey Biryukov
    Trac Moderator
    Posted 11 months ago #

    Moved the PHP5 constructor to before the PHP4 constructor. Seems to be working, although I don't really understand why.

    Yes, reordering the constructors is the correct fix here. The PHP5 constructor has priority over the PHP4 one.

    Or even why there's a PHP4 constructor in the mix?

    For compatibility with old plugins calling the PHP4 constructor directly.

Reply

You must log in to post.

About this Topic