WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#36927 closed defect (bug) (fixed)

Disjointed WP_Error documentation and handling in wp-signup.php

Reported by: jeremyfelt Owned by: jeremyfelt
Milestone: 4.6 Priority: normal
Severity: normal Version:
Component: Login and Registration Keywords: has-patch
Focuses: docs, multisite Cc:
PR Number:

Description

Most of the documentation for errors throughout wp-signup.php has the $errors data typed as array rather than WP_Error.

In show_user_form() and show_blog_form(), an empty string is set as default for the $errors param, but it is used as a WP_Error object throughout.

The likelihood of a fatal Call to a member function get_error_message() on string here is low, because this code is really self contained and somebody would need to filter responses to remove existing WP_Error objects completely. That said, we can still clean it up.

Attachments (1)

36927.diff (5.8 KB) - added by jeremyfelt 4 years ago.

Download all attachments as: .zip

Change History (3)

@jeremyfelt
4 years ago

#1 @jeremyfelt
4 years ago

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

In 37547:

Multisite: Clean up WP_Error documentation and handling in wp-signup.php

Fixes #36927.

#2 @DrewAPicture
4 years ago

  • Focuses docs added
Note: See TracTickets for help on using tickets.