Make WordPress Core

Opened 5 years ago

Closed 5 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: manzoorwanijk's profile manzoorwani.jk Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.3 Priority: normal
Severity: normal Version: 4.7
Component: REST API Keywords: has-patch commit
Focuses: rest-api Cc:

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 5 years ago.

Download all attachments as: .zip

Change History (7)

@manzoorwani.jk
5 years ago

#1 @manzoorwani.jk
5 years ago

  • Keywords has-patch added

#2 @TimothyBlynJacobs
5 years ago

  • Milestone changed from Awaiting Review to 5.3
  • Version set to 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.


5 years ago

#4 @TimothyBlynJacobs
5 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.


5 years ago

#6 @SergeyBiryukov
5 years ago

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