Make WordPress Core

Opened 17 years ago

Closed 16 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: Focuses:

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 17 years ago.

Download all attachments as: .zip

Change History (5)

#1 @miqrogroove
17 years ago

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

@dd32
17 years ago

#2 @dd32
17 years ago

  • Component WidgetsWarnings/Notices
  • Keywords has-patch added; needs-patch removed
  • Milestone 2.9.13.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
17 years ago

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

#4 @dd32
16 years ago

  • Resolutionfixed
  • Status newclosed

Fixed in [13068]

Note: See TracTickets for help on using tickets.