WordPress.org

Make WordPress Core

Ticket #38553: fix-terms-warning.diff

File fix-terms-warning.diff, 659 bytes (added by timmydcrawford, 5 years ago)
  • wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php

     
    10471047                foreach ( $taxonomies as $taxonomy ) {
    10481048                        $base = ! empty( $taxonomy->rest_base ) ? $taxonomy->rest_base : $taxonomy->name;
    10491049
    1050                         if ( ! isset( $request[ $base ] ) ) {
     1050                        if ( ! isset( $request[ $base ] ) || ! is_array( $request[ $base ] ) ) {
    10511051                                continue;
    10521052                        }
    10531053                        $terms = array_map( 'absint', $request[ $base ] );