• polev

    (@polev)


    Using WP GCalendar Version 2.0 | By Eurocizia team
    When define( 'WP_DEBUG', true);in wp-config.php`
    I have the following error (which prevented me to log in to my site):

    Notice: The called constructor method for WP_Widget in WPGCWidget is deprecated since version 4.3.0! Use
    __construct()
    instead. in ..../wp-includes/functions.php on line 3892

    To solve this, the following code in widgets.php

    function WPGCWidget() {
    	$widget_options = array(
    		'classname' => 'wpgc-widget',
    		'description' => 'WP GCalendar widget'
    	);
    		
    	parent::WP_Widget('WPGC_widget', 'WP GCalendar Widget', $widget_options);
    }

    should be replaced by

    function __construct() {
    	$widget_options = array(
    		'classname' => 'wpgc-widget',
    		'description' => 'WP GCalendar widget'
    	);
    		
    	parent::__construct('WPGC_widget', 'WP GCalendar Widget', $widget_options);
    }
    • This topic was modified 9 years ago by polev.
    • This topic was modified 9 years ago by t-p.

The topic ‘Notice in WP debug mode’ is closed to new replies.