WordPress.org

Make WordPress Core

Opened 3 months ago

Closed 2 months 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
Milestone: 5.3 Priority: normal
Severity: normal Version: 4.7
Component: REST API Keywords: has-patch commit
Focuses: rest-api Cc:
PR Number:

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 3 months ago.

Download all attachments as: .zip

Change History (7)

#1 @manzoorwani.jk
3 months ago

  • Keywords has-patch added

#2 @TimothyBlynJacobs
3 months 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.


3 months ago

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


2 months ago

#6 @SergeyBiryukov
2 months 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.