Make WordPress Core

#60039 closed defect (bug) (duplicate)

issue with wp-includes/class-wp-widget.php

Reported by: bryanlteague's profile bryanlteague Owned by:
Milestone: Priority: normal
Severity: critical Version: 6.4.2
Component: Widgets Keywords:
Focuses: Cc:

Description (last modified by SergeyBiryukov)

Running PHP 8.0.3

I receive the following error:
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function WP_Widget::__construct(), 0 passed in /var/www/html/marketing/wp-includes/class-wp-widget-factory.php on line 62 and at least 2 expected in /var/www/html/marketing/wp-includes/class-wp-widget.php:163

The function call on line 163:

public function __construct( $id_base, $name, $widget_options = array(), $control_options = array() ) { 

This needs to be updated to:

public function __construct( $id_base=null, $name=null, $widget_options = array(), $control_options = array() ) {

Change History (1)

#1 @SergeyBiryukov
12 months ago

  • Description modified (diff)
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi there, welcome to WordPress Trac!

Thanks for the report, we're already tracking this issue in #56127.

Note: See TracTickets for help on using tickets.