[wp-trac] [WordPress Trac] #60039: issue with wp-includes/class-wp-widget.php

WordPress Trac noreply at wordpress.org
Fri Dec 8 20:34:26 UTC 2023


#60039: issue with wp-includes/class-wp-widget.php
--------------------------+------------------------
 Reporter:  bryanlteague  |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Widgets       |     Version:  6.4.2
 Severity:  critical      |  Resolution:  duplicate
 Keywords:                |     Focuses:
--------------------------+------------------------
Changes (by SergeyBiryukov):

 * status:  new => closed
 * resolution:   => duplicate
 * milestone:  Awaiting Review =>


Old description:

> 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() ) {

New description:

 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() ) {
 }}}

--

Comment:

 Hi there, welcome to WordPress Trac!

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

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60039#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list