Title: &quot;Redefining already defined constructor for class WP_Widget&quot;
Last modified: August 21, 2016

---

# "Redefining already defined constructor for class WP_Widget"

 *  Resolved [jcartland](https://wordpress.org/support/users/jcartland/)
 * (@jcartland)
 * [13 years ago](https://wordpress.org/support/topic/redefining-already-defined-constructor-for-class-wp_widget/)
 * 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?)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Moderator [Sergey Biryukov](https://wordpress.org/support/users/sergeybiryukov/)
 * (@sergeybiryukov)
 * WordPress Dev
 * [13 years ago](https://wordpress.org/support/topic/redefining-already-defined-constructor-for-class-wp_widget/#post-3763555)
 * [http://core.trac.wordpress.org/ticket/20801](http://core.trac.wordpress.org/ticket/20801)
 *  Moderator [Sergey Biryukov](https://wordpress.org/support/users/sergeybiryukov/)
 * (@sergeybiryukov)
 * WordPress Dev
 * [12 years, 12 months ago](https://wordpress.org/support/topic/redefining-already-defined-constructor-for-class-wp_widget/#post-3763599)
 * > 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.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘"Redefining already defined constructor for class WP_Widget"’ is closed
to new replies.

## Tags

 * [widgets.php](https://wordpress.org/support/topic-tag/widgets-php/)
 * [wp_widget](https://wordpress.org/support/topic-tag/wp_widget/)

 * In: [Alpha/Beta/RC](https://wordpress.org/support/forum/alphabeta/)
 * 2 replies
 * 2 participants
 * Last reply from: [Sergey Biryukov](https://wordpress.org/support/users/sergeybiryukov/)
 * Last activity: [12 years, 12 months ago](https://wordpress.org/support/topic/redefining-already-defined-constructor-for-class-wp_widget/#post-3763599)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
