Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#18455 closed defect (bug) (fixed)

Undefined index in _pad_term_counts()

Reported by: valendesigns's profile valendesigns Owned by: ryan's profile ryan
Milestone: 3.3 Priority: normal
Severity: normal Version: 3.2.1
Component: Taxonomy Keywords: has-patch
Focuses: Cc:

Description

When using wp_list_categories() in conjunction with a comma separated string of child category ID's and the 'show_count=1' option, the _pad_term_counts() function in taxonomy.php will return an undefined index notice on line 2806.

The fix below:

while ( isset($terms_by_id[$child]->parent) && $parent = $terms_by_id[$child]->parent ) {

Attachments (1)

18455.patch (757 bytes) - added by SergeyBiryukov 13 years ago.

Download all attachments as: .zip

Change History (3)

#1 @SergeyBiryukov
13 years ago

  • Keywords has-patch added; needs-patch removed
  • Milestone changed from Awaiting Review to 3.3

#2 @ryan
13 years ago

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

In [19077]:

Avoid undefined index notices. Props SergeyBiryukov, valendesigns. fixes #18455

Note: See TracTickets for help on using tickets.