From 30b82c6bee5bc172492286b7ad1bcdf016a776c4 Mon Sep 17 00:00:00 2001 From: Timothy Jacobs Date: Mon, 1 Mar 2021 16:30:41 +0000 Subject: [PATCH] REST API: Correct error code for the maxItems keyword. See [50007]. git-svn-id: https://develop.svn.wordpress.org/trunk@50461 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(