Deprecated constructor
-
Plugin: wp-google-search
Notice The called constructor method for WP_Widget in WGS_Widget is deprecated since version 4.3.0! Use __construct() instead. wp-includes/functions.php:3846Call Stack
_deprecated_constructor()
wp-includes/class-wp-widget.php:200
WP_Widget->WP_Widget()
wp-content/plugins/wp-google-search/wgs-widget.php:7
WGS_Widget->__construct()
wp-includes/class-wp-widget-factory.php:106
WP_Widget_Factory->register()
wp-includes/widgets.php:113
register_widget()
wp-content/plugins/wp-google-search/wgs-widget.php:92
wgs_widget_init()
wp-includes/class-wp-hook.php:298
do_action(‘widgets_init’)
wp-includes/widgets.php:1474
wp_widgets_init()
wp-includes/class-wp-hook.php:298
do_action(‘init’)
wp-settings.php:449
-
Thank you for let us know it.
This is only a notice, you can use the plugin without any problem regardless of this message.
We will change the code in the next release.Yep, the same thing… After each upload a page:
PHP Notice: The called constructor method for WP_Widget in WGS_Widget is deprecated since version 4.3.0! Use__construct()
instead. in D:\OpenServer\domains\rehub\wp-includes\functions.php on line 3767
WP ver. 4.6.1
How do I get the updated version?
The plugin has not modified yet, the change will be included in version 1.0.6.
This is only a warning, thus the plugin can be used until the next version is released.-
This reply was modified 9 years, 2 months ago by
WebshopLogic.
to hide the message until update you can turn debug to false
I solved the error message by modifying wp-google-search/wgs-widget.php as follow:
parent::__construct(false, $name = __('WP Goosgle Search (WGS)','wgs'));instead of
parent::WP_Widget(false, $name = __('WP Goosgle Search (WGS)','wgs'));@webshoplogic any GitHub repo to send a PR?
-
This reply was modified 9 years, 2 months ago by
The topic ‘Deprecated constructor’ is closed to new replies.