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. Built from https://develop.svn.wordpress.org/branches/5.7@50470 git-svn-id: http://core.svn.wordpress.org/branches/5.7@50081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e0058af83d
commit
b18d2e5fda
|
@ -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(
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.7-RC1-50469';
|
||||
$wp_version = '5.7-RC1-50470';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue