If your host runs PHP 7 you might end up with one of these errors
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP;
Here is the fix.
- Find the class that triggered the error.
- Search within the class for a function which has the same name as the class. This is the constructor function.
- Change the name of this function to __construct()
In WordPress you might see this notice
Notice: The called constructor method for WP_Widget is deprecated since version 4.3.0! Use __construct()
- Find the class that is triggering this notice.
- Replace $this->WP_Widget with __construct()
Leave a Reply