Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#33321 closed defect (bug) (fixed)

PHPDoc fix to wp_create_user

Reported by: ore4444's profile Ore4444 Owned by: drewapicture's profile DrewAPicture
Milestone: 4.4 Priority: normal
Severity: normal Version: 3.0
Component: Users Keywords: good-first-bug has-patch
Focuses: docs Cc:


The line:

@return int The new user's ID.

in function wp_create_user in user.php should be changed to:

@return int|WP_Error The newly created user's ID or a WP_Error object if the user could not be created.

because wp_create_user inherits the return value from wp_insert_user.

Attachments (1)

33321.1.patch (629 bytes) - added by jmayhak 9 years ago.

Download all attachments as: .zip

Change History (8)

#1 @SergeyBiryukov
9 years ago

  • Version changed from 4.2.4 to 3.0

Hi @Ore4444, welcome to Trac and thanks for the ticket!

Missed in [12468], partially fixed in [32637].

Would you like to try submitting a patch?

#2 @Ore4444
9 years ago

no, thank you

#3 @SergeyBiryukov
9 years ago

  • Keywords needs-patch good-first-bug added
  • Milestone changed from Awaiting Review to Future Release

9 years ago

#4 @jmayhak
9 years ago

  • Keywords has-patch added; needs-patch removed

#5 @DrewAPicture
9 years ago

  • Owner set to DrewAPicture
  • Status changed from new to reviewing

#6 @DrewAPicture
9 years ago

  • Milestone changed from Future Release to 4.4

#7 @DrewAPicture
9 years ago

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

In 33725:

Docs: Clarify the return description for wp_create_user() to illustrate that a WP_Error object will be returned on failure.

Props jmayhak
Fixes #33321.

Note: See TracTickets for help on using tickets.