Title: Constructor Method Depreciated
Last modified: June 4, 2018

---

# Constructor Method Depreciated

 *  [heliositswp](https://wordpress.org/support/users/heliositswp/)
 * (@heliositswp)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/constructor-method-depreciated/)
 * Hi guys,
 * I am quite new here. We recently upgraded our DB from PHP 5.* to 7.
    My site(
   s) don’t run now. Looks like some constructor issue, but have no idea where /
   how to fix this. Here is 1 line of many errors: Notice: The called constructor
   method for WP_Widget in LatestBlogWidget is deprecated since version 4.3.0! Use
   __construct() Please help? Thanks.
    -  This topic was modified 7 years, 12 months ago by [heliositswp](https://wordpress.org/support/users/heliositswp/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fconstructor-method-depreciated%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [gr8nilay](https://wordpress.org/support/users/gr8nilay/)
 * (@gr8nilay)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/constructor-method-depreciated/#post-10360877)
 * The ability to use PHP 4 style constructors is getting removed from PHP. Without
   an update, many plugins will eventually no longer work (this is PHP breaking 
   this backwards compatibility, not WordPress)
 * Change WP_Widget::WP_Widget() or {object}->WP_Widget() or parent::WP_Widget()
   to parent::__construct() in your plugin file.
 * OR
 * You can hide this kind of error by adding this filter in your functions.php
 * add_filter(‘deprecated_constructor_trigger_error’, ‘__return_false’);
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [7 years, 12 months ago](https://wordpress.org/support/topic/constructor-method-depreciated/#post-10361471)
 * If you can figure out what plugin is causing the error, make sure you’re using
   the latest version and, if so, contact its developers about getting it fixed.

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

The topic ‘Constructor Method Depreciated’ is closed to new replies.

## Tags

 * [php upgrade](https://wordpress.org/support/topic-tag/php-upgrade/)
 * [PHP7](https://wordpress.org/support/topic-tag/php7/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * Last activity: [7 years, 12 months ago](https://wordpress.org/support/topic/constructor-method-depreciated/#post-10361471)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
