Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#35222 closed enhancement (fixed)

count_user_posts() - change docs to return string instead of int

Reported by: nofearinc's profile nofearinc Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.5 Priority: normal
Severity: minor Version:
Component: Users Keywords: has-patch
Focuses: docs Cc:

Description

As seen in a tweet by Rarst and tested locally, count_user_posts returns the number of posts from a user as a string instead of int calling $wpdb->get_var. Since people may validate against strings or compare accordingly, a safe bet is letting IDEs know that the return type is string.

Attachments (1)

35222.diff (749 bytes) - added by nofearinc 8 years ago.

Download all attachments as: .zip

Change History (4)

@nofearinc
8 years ago

#2 @SergeyBiryukov
8 years ago

  • Milestone changed from Awaiting Review to 4.5

#3 @SergeyBiryukov
8 years ago

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

In 36085:

Docs: Correct @return type for count_user_posts().

Props nofearinc.
Fixes #35222.

Note: See TracTickets for help on using tickets.