Opened 8 months ago

Closed 8 months 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:

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 8 months ago.

Download all attachments as: .zip

Change History (2)

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to 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.