Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#47905 closed defect (bug) (fixed)

rest_validate_value_from_schema() shows the value instead of the param when it's invalid.

Reported by: manzoorwani.jk Owned by: SergeyBiryukov
Priority: normal Milestone: 5.3
Component: REST API Version: 4.7
Severity: normal Keywords: has-patch commit
Cc: Focuses: rest-api

Description

The second argument of sprintf here and here should be $param instead of $value.

Attachments (1)

47905.diff​ (1010 bytes ) - added by manzoorwani.jk 7 years ago.

Download all attachments as: .zip

Change History (7)

@manzoorwani.jk
7 years ago

#1 @manzoorwani.jk
7 years ago

  • Keywords has-patch added

#2 @TimothyBlynJacobs
7 years ago

  • Milestone Awaiting Review → 5.3
  • Version → 4.7

Thanks for the patch @manzoorwanijk! This looks good to me, milestoning for 5.3

This ticket was mentioned in ​Slack in #core-restapi by timothybjacobs. ​View the logs.


7 years ago

#4 @TimothyBlynJacobs
7 years ago

  • Keywords commit added

Marking as commit after discussion with @kadamwhite during today's office hours.

This ticket was mentioned in ​Slack in #core-restapi by timothybjacobs. ​View the logs.


7 years ago

#6 @SergeyBiryukov
7 years ago

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

In 46101:

REST API: Use correct parameter name in rest_validate_value_from_schema() error messages.

Props manzoorwanijk.
Fixes #47905.

Note: See TracTickets for help on using tickets.