mirror of
git://develop.git.wordpress.org/
synced 2025-03-19 11:29:48 +01:00
REST API: Correct error code for the maxItems keyword.
Follow-up to [50007]. Props TimothyBlynJacobs. Reviewed by desrosj, SergeyBiryukov. Merges [50461] to the 5.7 branch. Fixes #52317. git-svn-id: https://develop.svn.wordpress.org/branches/5.7@50470 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
04c2acb024
commit
582df45458
@ -2365,7 +2365,7 @@ function rest_validate_array_value_from_schema( $value, $args, $param ) {
|
||||
|
||||
if ( isset( $args['maxItems'] ) && count( $value ) > $args['maxItems'] ) {
|
||||
return new WP_Error(
|
||||
'test_too_many_items',
|
||||
'rest_too_many_items',
|
||||
/* translators: 1: Parameter, 2: Number. */
|
||||
sprintf(
|
||||
_n(
|
||||
|
Loading…
x
Reference in New Issue
Block a user