WordPress.org

Make WordPress Core

Ticket #45448: 45448.diff

File 45448.diff, 685 bytes (added by wpboss, 3 years ago)

I have fixed this and test it.

  • 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..72127df519 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, null, PREG_SPLIT_NO_EMPTY );
    10861086                }
    10871087                if ( ! wp_is_numeric_array( $value ) ) {
    10881088                        /* translators: 1: parameter, 2: type name */