[wp-trac] [WordPress Trac] #60725: class-wp-widget fatal error in PHP 8.2

WordPress Trac noreply at wordpress.org
Mon Mar 11 19:19:00 UTC 2024


#60725: class-wp-widget fatal error in PHP 8.2
--------------------------+------------------------
 Reporter:  markhowe      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Widgets       |     Version:
 Severity:  normal        |  Resolution:  duplicate
 Keywords:                |     Focuses:
--------------------------+------------------------
Changes (by sabernhardt):

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


Comment:

 That error was already reported on #56127.

 The [https://wordpress.stackexchange.com/questions/406260/wordpress-6-0
 -class-wp-widget-php-fatal-errors-in-php-8-1-6 StackExchange suggestion]
 is only a **temporary** solution to get into the admin and replace the
 theme or deactivate a plugin that causes the problem. PHP 8+ is not
 particularly friendly to code that has not been updated for years.

 A few
 [https://wordpress.org/search/PHP+Fatal+error%3A+Uncaught+ArgumentCountError+Too+few+arguments+to+function+WP_Widget%3A%3A__construct()%2C+0+passed+in
 +wp-includes%2Fclass-wp-widget-factory.php/ support topics] suggest ways
 to edit widget registration code within a theme or plugin. However, if
 your theme causes the error and you cannot update it a newer version, I
 think finding a new theme to replace it would be a better long-term
 strategy.

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


More information about the wp-trac mailing list