Make WordPress Core

Ticket #48839: 48839.1.patch

File 48839.1.patch, 1.1 KB (added by dkarfa, 5 years ago)
  • src/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php

     
    126126         *
    127127         * @since 4.7.0
    128128         *
    129          * @param array           $meta      Array of meta parsed from the request.
    130          * @param int             $object_id Object ID to fetch meta for.
     129         * @param array $meta      Array of meta parsed from the request.
     130         * @param int   $object_id Object ID to fetch meta for.
    131131         * @return null|WP_Error Null on success, WP_Error object on failure.
    132132         */
    133133        public function update_value( $meta, $object_id ) {
     
    435435
    436436                        $rest_args['schema'] = $this->default_additional_properties_to_false( $rest_args['schema'] );
    437437
    438                         if ( ! in_array( $type, array( 'string', 'boolean', 'integer', 'number', 'array', 'object' ) ) ) {
     438                        if ( ! in_array( $type, array( 'string', 'boolean', 'integer', 'number', 'array', 'object' ), true ) ) {
    439439                                continue;
    440440                        }
    441441