Title: PHP error
Last modified: August 30, 2016

---

# PHP error

 *  Resolved [aelitelimited](https://wordpress.org/support/users/aelitelimited/)
 * (@aelitelimited)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wp-7/)
 * Hi I don’t think the plugin is completely updated to be fully compatible with
   4.3.1 as I still notice the error:
 * Notice: The called constructor method for WP_Widget is deprecated since version
   4.3.0! Use
    __construct() instead. in \wp-includes\functions.php on line 3457
 * Any thoughts?
 * Thanks
 * [https://wordpress.org/plugins/uji-countdown/](https://wordpress.org/plugins/uji-countdown/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [caraffande](https://wordpress.org/support/users/caraffande/)
 * (@caraffande)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wp-7/#post-6647369)
 * Same problem for me, with the added burden that this deprecation warning is breaking
   the AJAX functionality of my plugin if WP_DEBUG is set to TRUE
 *  [caraffande](https://wordpress.org/support/users/caraffande/)
 * (@caraffande)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wp-7/#post-6647370)
 * This is the fix
 *     ```
       class ujic_Widget extends WP_Widget {
   
          protected $plugin_slug = 'uji-countdown';
   
          /**
            * Uji Countdown Init
            *
            * @since   2.0
            *
            * @var     string
            */
       //   public function ujic_Widget() {  // <--- Replace this...
          public function __construct() { // <--- with this, and...
             $widget_ops = array(
                 'classname' => 'uji_Widget',
                 'description' => 'Uji Countdown widget.'
             );
       //      $this->WP_Widget( 'uji_Widget', 'Uji Countdown', $widget_ops ); // <--- this...
             parent::__construct( 'uji_Widget', 'Uji Countdown', $widget_ops ); // <--- with this.
   
             //actions
             add_action( 'plugins_loaded', array( &$this, 'load_textdomain' ) );
             add_action( 'admin_enqueue_scripts', array( &$this, 'admin_widgets_scripts_styles' ) );
          }
       ```
   
 *  Plugin Author [Activity Track](https://wordpress.org/support/users/ujimoto/)
 * (@ujimoto)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/wp-7/#post-6647435)
 * Thanks caraffande,
 * Only when use PHP7+
    It will be fixed in the next update.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘PHP error’ is closed to new replies.

 * ![](https://ps.w.org/uji-countdown/assets/icon-256x256.jpg?rev=1074703)
 * [Uji Countdown](https://wordpress.org/plugins/uji-countdown/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/uji-countdown/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/uji-countdown/)
 * [Active Topics](https://wordpress.org/support/plugin/uji-countdown/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/uji-countdown/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/uji-countdown/reviews/)

## Tags

 * [wp_widget](https://wordpress.org/support/topic-tag/wp_widget/)
 * [__construct](https://wordpress.org/support/topic-tag/__construct/)

 * 3 replies
 * 3 participants
 * Last reply from: [Activity Track](https://wordpress.org/support/users/ujimoto/)
 * Last activity: [9 years, 12 months ago](https://wordpress.org/support/topic/wp-7/#post-6647435)
 * Status: resolved