Title: The called constructor method deprecated
Last modified: April 15, 2017

---

# The called constructor method deprecated

 *  Resolved [idowebwork](https://wordpress.org/support/users/mannweb/)
 * (@mannweb)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/the-called-constructor-method-deprecated/)
 * With debugging turned on, upon activating the plugin, this error appears:
 * “My NOTICE [1024] The called constructor method for WP_Widget in dk_speakout_petition_widget
   is deprecated since version 4.3.0! Use __construct() instead.”
 * To fix this error, change line 17 from:
    `$this->WP_Widget( 'dk_speakout_petition_widget','
   SpeakOut! Email Petitions', $widget_ops );` to use the newer PHP parent constructor,
   like this: `parent::__construct( 'dk_speakout_petition_widget', __( 'SpeakOut!
   Email Petitions', 'dk_speakout' ), $widget_ops );`
 * Problem solved. Better debugging should have caught this.
 * Hope this is fixed in the next release 😀 Had to fix this issue in a few of my
   own widgets, so this is battle tested.
    -  This topic was modified 9 years, 1 month ago by [idowebwork](https://wordpress.org/support/users/mannweb/).

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

 *  Plugin Author [SpeakOut! Steve](https://wordpress.org/support/users/123host/)
 * (@123host)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/the-called-constructor-method-deprecated/#post-9034709)
 * Thanks for that.
 * It isn’t an error as such, it is a warning that (right now) doesn’t affect anything.
 * FYI, I took this plugin over after it had been abandoned so there may be all 
   sorts of issues. I haven’t gone through all the code looking for bugs, so I do
   appreciate hearing about them.
 * I have updated the code and will push an upgrade maybe this week when I have 
   a couple of other things sorted out.
 *  Plugin Author [SpeakOut! Steve](https://wordpress.org/support/users/123host/)
 * (@123host)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/the-called-constructor-method-deprecated/#post-9055769)
 * This is now fixed in version 1.3.0 which will be coming soon
 *  [sthenpetti](https://wordpress.org/support/users/sthenpetti/)
 * (@sthenpetti)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/the-called-constructor-method-deprecated/#post-9409564)
 * Hi! I’m having problems with this constructor on line 9.
 * “Deprecated: Methods with the same name as their class will not be constructors
   in a future version of PHP; dk_speakout_petition_widget has a deprecated constructor
   in (…)/public_html/plugins/speakout/includes/widget.php on line 9”
 * Can you please help?
 *  Plugin Author [SpeakOut! Steve](https://wordpress.org/support/users/123host/)
 * (@123host)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/the-called-constructor-method-deprecated/#post-9409622)
 * What version of SpeakOut! do you have installed? I fixed this a while back.
 *  Plugin Author [SpeakOut! Steve](https://wordpress.org/support/users/123host/)
 * (@123host)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/the-called-constructor-method-deprecated/#post-9409626)
 * And what version of php?

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

The topic ‘The called constructor method deprecated’ is closed to new replies.

 * ![](https://ps.w.org/speakout/assets/icon-256x256.png?rev=1649238)
 * [SpeakOut! Email Petitions](https://wordpress.org/plugins/speakout/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/speakout/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/speakout/)
 * [Active Topics](https://wordpress.org/support/plugin/speakout/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/speakout/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/speakout/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [SpeakOut! Steve](https://wordpress.org/support/users/123host/)
 * Last activity: [8 years, 9 months ago](https://wordpress.org/support/topic/the-called-constructor-method-deprecated/#post-9409626)
 * Status: resolved