[wp-trac] [WordPress Trac] #56127: WP_Widget constructor throws fatal ArgumentCountError

WordPress Trac noreply at wordpress.org
Mon Aug 7 20:56:13 UTC 2023


#56127: WP_Widget constructor throws fatal ArgumentCountError
-------------------------------------------+-------------------------------
 Reporter:  firefly2000                    |       Owner:  (none)
     Type:  defect (bug)                   |      Status:  new
 Priority:  normal                         |   Milestone:  Awaiting Review
Component:  Widgets                        |     Version:  6.0
 Severity:  normal                         |  Resolution:
 Keywords:  needs-patch reporter-feedback  |     Focuses:  coding-standards
-------------------------------------------+-------------------------------

Comment (by hellofromTonya):

 Audit of WordPress Core 6.0 widgets

 [https://core.trac.wordpress.org/browser/branches/6.0/src/wp-
 includes/widgets Here are all of the widget files shipped in WP 6.0]:

 (Note: ✅ means its constructor is correct)

 * `WP_Nav_Menu_Widget` ✅
 ([https://core.trac.wordpress.org/browser/branches/6.0/src/wp-
 includes/widgets/class-wp-nav-menu-widget.php source code])
 * `WP_Widget_Archives` ✅
 ([https://core.trac.wordpress.org/browser/branches/6.0/src/wp-
 includes/widgets/class-wp-widget-archives.php source code])
 * `WP_Widget_Block` ✅
 ([https://core.trac.wordpress.org/browser/branches/6.0/src/wp-
 includes/widgets/class-wp-widget-block.php source code])
 * `WP_Widget_Calendar` ✅
 ([https://core.trac.wordpress.org/browser/branches/6.0/src/wp-
 includes/widgets/class-wp-widget-calendar.php source code])
 * `WP_Widget_Categories` ✅
 ([https://core.trac.wordpress.org/browser/branches/6.0/src/wp-
 includes/widgets/class-wp-widget-categories.php source code])
 * `WP_Widget_Custom_HTML` ✅
 ([https://core.trac.wordpress.org/browser/branches/6.0/src/wp-
 includes/widgets/class-wp-widget-custom-html.php source code])
 * `WP_Widget_Links` ✅
 ([https://core.trac.wordpress.org/browser/branches/6.0/src/wp-
 includes/widgets/class-wp-widget-links.php source code])
 * `WP_Widget_Media_Audio` ✅
 ([https://core.trac.wordpress.org/browser/branches/6.0/src/wp-
 includes/widgets/class-wp-widget-media-audio.php source code])
 * `WP_Widget_Media_Gallery` ✅
 ([https://core.trac.wordpress.org/browser/branches/6.0/src/wp-
 includes/widgets/class-wp-widget-media-gallery.php source code])
 * `WP_Widget_Media_Image` ✅
 ([https://core.trac.wordpress.org/browser/branches/6.0/src/wp-
 includes/widgets/class-wp-widget-media-image.php source code])
 * `WP_Widget_Media_Video` ✅
 ([https://core.trac.wordpress.org/browser/branches/6.0/src/wp-
 includes/widgets/class-wp-widget-media-video.php source code])
 * `WP_Widget_Media` is an abstract class ✅
 ([https://core.trac.wordpress.org/browser/branches/6.0/src/wp-
 includes/widgets/class-wp-widget-media.php source code])
 * `WP_Widget_Meta` ✅
 ([https://core.trac.wordpress.org/browser/branches/6.0/src/wp-
 includes/widgets/class-wp-widget-meta.php source code])
 * `WP_Widget_Pages` ✅
 ([https://core.trac.wordpress.org/browser/branches/6.0/src/wp-
 includes/widgets/class-wp-widget-pages.php source code])
 * `WP_Widget_Recent_Comments` ✅
 ([https://core.trac.wordpress.org/browser/branches/6.0/src/wp-
 includes/widgets/class-wp-widget-recent-comments.php source code])
 * `WP_Widget_Recent_Posts` ✅
 ([https://core.trac.wordpress.org/browser/branches/6.0/src/wp-
 includes/widgets/class-wp-widget-recent-posts.php source code])

 All of Core's widgets are correctly declaring their constructors.

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


More information about the wp-trac mailing list