WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 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:

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

Download all attachments as: .zip

Change History (5)

comment:1 miqrogroove4 years ago

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

dd324 years ago

comment:2 dd324 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.

comment:3 hakre4 years ago

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

comment:4 dd324 years ago

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

Fixed in [13068]

Note: See TracTickets for help on using tickets.