1
The called constructor method for WP_Widget in GFWidget is deprecated since version 4.3.0! Use

__construct()

Hi,

I have been getting some internal server errors on a site I am making. So I turned debug on and the above is the error I am receiving.

I do not seem to able to find a solid solution for this error, can anyone help please

1 Answer 1

2

You are using a deprecated way to declare widgets. WordPress is anticipating on constructor being deprecated in PHP 7.0, in favour of __construct. Please refer to the Widgets API to see how widgets are constructed these days.

If the GFWidget you mention is generated by a plugin that plugin is very much outdated and probably shouldn't be used anymore.

2
  • Slightly odd, the two plugins are gravity forms and yoast. Both are up-to-date. Just seems a little odd that such well developed plugins are using updated methods Aug 21, 2016 at 15:51
  • Even more strange: the source at github says the widget is already using __construct Perhaps your install got corrupted one way or the other.
    – cjbj
    Aug 21, 2016 at 15:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.