php - The called constructor method for WP_Widget is deprecated since version 4.3.0 -
i updated wordpress 4.3 , seems broken.
i error shows on page:
notice: called constructor method wp_widget deprecated since version 4.3.0! use
__construct()
instead. in /mnt/stor13-wc1-ord1/754452/www.eden-festival.com/web/content/securewp/wp-includes/functions.php on line 3457
is there needs fixed?
since php 7 isn't supporting anymore old php 4 object construct , replaced __construct()
wordpress developers created notice message plugin developers change way plugins work run on next php versions , php 4 dead long time ago there's no reason use style of object construct.
how fix?
option 1 - not going upgrade newer php versions
just add add_filter('deprecated_constructor_trigger_error', '__return_false');
to functions.php file ignore notices.
option 2 - might upgrade php 7 / prefer dealing issue silencing it
if third party plugin, beware if make change , plugin developer release update override changes.contacting plugin developer fix issue best option
find problematic plugin , change
parent::wp_widget
to
parent::__construct
Comments
Post a Comment