From 582df454582b42a68508aadbd91a10bbf4a357d5 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 2 Mar 2021 12:53:12 +0000 Subject: [PATCH] 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 --- src/wp-includes/rest-api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/rest-api.php b/src/wp-includes/rest-api.php index a38d2ec460..336fe6b071 100644 --- a/src/wp-includes/rest-api.php +++ b/src/wp-includes/rest-api.php @@ -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(