Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#11606 closed defect (bug) (fixed)

No Default Values for WP_Widget_Categories

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


$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 8 years ago.

Download all attachments as: .zip

Change History (5)

#1 @miqrogroove
8 years ago

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

8 years ago

#2 @dd32
8 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.

#3 @hakre
8 years ago

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

#4 @dd32
8 years ago

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

Fixed in [13068]

Note: See TracTickets for help on using tickets.