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.


git-svn-id: https://develop.svn.wordpress.org/trunk@32737 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-06-12 18:44:50 +00:00
parent ca123a2054
commit cae366cad0

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