From 4835310a18b16ea602c8d053fe9344af5dd18f53 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Fri, 12 Jun 2015 18:45:25 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@32737 git-svn-id: http://core.svn.wordpress.org/trunk@32708 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-media-list-table.php | 3 ++- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/class-wp-media-list-table.php b/wp-admin/includes/class-wp-media-list-table.php index a364578621..0c76796562 100644 --- a/wp-admin/includes/class-wp-media-list-table.php +++ b/wp-admin/includes/class-wp-media-list-table.php @@ -481,7 +481,8 @@ foreach ( $columns as $column_name => $column_display_name ) { $taxonomy = false; if ( $taxonomy ) { - if ( $terms = get_the_terms( $post->ID, $taxonomy ) ) { + $terms = get_the_terms( $post->ID, $taxonomy ); + if ( is_array( $terms ) ) { $out = array(); foreach ( $terms as $t ) { $posts_in_term_qv = array(); diff --git a/wp-includes/version.php b/wp-includes/version.php index f96c2d13dd..1721ee745d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-alpha-32736'; +$wp_version = '4.3-alpha-32737'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.