Make WordPress Core

Ticket #45448: 45448-1.diff

File 45448-1.diff, 683 bytes (added by wpboss, 4 years ago)

I have fixed as per your suggestion.

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

     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 0cce9fa62f..cf61cdcbd5 100644
    a b function rest_get_avatar_sizes() { 
    10821082function rest_validate_value_from_schema( $value, $args, $param = '' ) {
    10831083        if ( 'array' === $args['type'] ) {
    10841084                if ( ! is_array( $value ) ) {
    1085                         $value = preg_split( '/[\s,]+/', $value );
     1085                        $value = preg_split( '/[\s,]+/', $value, -1, PREG_SPLIT_NO_EMPTY );
    10861086                }
    10871087                if ( ! wp_is_numeric_array( $value ) ) {
    10881088                        /* translators: 1: parameter, 2: type name */