Opened 3 years ago

Closed 3 years ago

#11606 closed defect (bug) (fixed)

No Default Values for WP_Widget_Categories

Reported by: miqrogroove Owned by: westi
Priority: normal Milestone: 3.0
Component: Warnings/Notices Version: 2.8
Severity: minor Keywords: has-patch
Cc:

Description

$instance = wp_parse_args( (array) $instance, array( 'title' => '') );
PHP Notice:  Undefined index:  count in /wp-includes/default-widgets.php on line 475
PHP Notice:  Undefined index:  hierarchical in /wp-includes/default-widgets.php on line 476
PHP Notice:  Undefined index:  dropdown in /wp-includes/default-widgets.php on line 477

It's an easy fix but I know you guys hate to do easy fixes around here...

Attachments (1)

11606.diff (4.5 KB) - added by dd32 3 years ago.

Download all attachments as: .zip

Change History (5)

WP_Widget_Categories::update() doesn't even call wp_parse_args(), so it probably needs fixed in both places.

dd323 years ago

comment:2   dd323 years ago

  • Component changed from Widgets to Warnings/Notices
  • Keywords has-patch added; needs-patch removed
  • Milestone changed from 2.9.1 to 3.0
  • Owner changed from azaozz to westi

attachment 11606.diff added

  • Cleans up the PHP to reduce warnings
  • Some whitepsace changes to bring it inline with coding standards
  • Some cleanups to make code consistent throughout.

Changing milestone to 3.0 as PHP Notices are not generally commited to maintainence releases, Its best left to the commitor to bring it into the point release.

Some other warning tickets for Reference: #10445, #11435, #11504, #11521

comment:4   dd323 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [13068]

Note: See TracTickets for help on using tickets.