Make WordPress Core

Changeset 32737


Ignore:
Timestamp:
06/12/2015 06:44:50 PM (9 years ago)
Author:
wonderboymusic
Message:

In WP_Media_List_Table::display_rows(), get_the_terms() can return WP_Error, so its return value should be checked before traversing.

See #32444.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-media-list-table.php

    r32725 r32737  
    482482
    483483                if ( $taxonomy ) {
    484                     if ( $terms = get_the_terms( $post->ID, $taxonomy ) ) {
     484                    $terms = get_the_terms( $post->ID, $taxonomy );
     485                    if ( is_array( $terms ) ) {
    485486                        $out = array();
    486487                        foreach ( $terms as $t ) {
Note: See TracChangeset for help on using the changeset viewer.