Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Deprecation warning on PHP 7.2

$
0
0

Replies: 0

Hi,

I’ve been testing a client site on PHP 7.2 in preparation for their host (WP Engine) upgrading their PHP version soon. The Genesis Slider was showing a warning “Methods with the same name as their class will not be constructors in a future version of PHP” in plugin.php.

class Genesis_SliderWidget extends WP_Widget on line 200 in plugin.php is using the function called Genesis_SliderWidget() as the constructor. This function name needs to change to __construct() instead.

ie.
On line 200,
Change function Genesis_SliderWidget() {
to
Change function __construct() {

Thanks.


Viewing all articles
Browse latest Browse all 59525

Trending Articles