Make WordPress Core

Changeset 50470


Ignore:
Timestamp:
03/02/2021 12:53:12 PM (6 years ago)
Author:
SergeyBiryukov
Message:

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.

Location:
branches/5.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.7

  • branches/5.7/src/wp-includes/rest-api.php

    r50340 r50470  
    23662366        if ( isset( $args['maxItems'] ) && count( $value ) > $args['maxItems'] ) {
    23672367                return new WP_Error(
    2368                         'test_too_many_items',
     2368                        'rest_too_many_items',
    23692369                        /* translators: 1: Parameter, 2: Number. */
    23702370                        sprintf(
Note: See TracChangeset for help on using the changeset viewer.