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
This commit is contained in:
Scott Taylor 2015-06-12 18:45:25 +00:00
parent f88b42be94
commit 4835310a18
2 changed files with 3 additions and 2 deletions

View File

@ -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();

View File

@ -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.