Merge pull request #253 from kadimi/patch-10

Make sure `wp_list_pluck()` is fed an array
This commit is contained in:
Brian Miyaji
2018-02-26 14:30:51 +11:00
committed by GitHub

View File

@@ -49,7 +49,7 @@ class SP_Meta_Box_Staff_Details {
endif;
$roles = get_the_terms( $post->ID, 'sp_role' );
$role_ids = wp_list_pluck( $roles, 'term_id' );
$role_ids = is_array( $roles ) ? wp_list_pluck( $roles, 'term_id' ) : array();
$teams = get_posts( array( 'post_type' => 'sp_team', 'posts_per_page' => -1 ) );
$past_teams = array_filter( get_post_meta( $post->ID, 'sp_past_team', false ) );