Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#21888 closed defect (bug) (fixed)

Correct wp_count_terms() @return value

Reported by: SergeyBiryukov Owned by: nacin
Priority: normal Milestone: 3.5
Component: Inline Docs Version:
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

wp_count_terms() calls get_terms(), which returns a WP_Error object on failure:
​http://core.trac.wordpress.org/browser/tags/3.4.2/wp-includes/taxonomy.php#L1163

Attachments (1)

21888.patch​ (579 bytes ) - added by SergeyBiryukov 14 years ago.

Download all attachments as: .zip

Change History (2)

#1 @nacin
14 years ago

  • Owner set to nacin
  • Resolution → fixed
  • Status new → closed

In [21843]:

Update docs to reflect that wp_count_terms() can return WP_Error when the taxonomy does not exist. props SergeyBiryukov, fixes #21888.

Note: See TracTickets for help on using tickets.