Making WordPress.org

Changeset 3138


Ignore:
Timestamp:
05/13/2016 10:12:14 PM (10 years ago)
Author:
iandunn
Message:

WordCamp Post Types: Check $session_tracks type before using it as an array.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php

    r3110 r3138  
    612612                $session_title        = apply_filters( 'the_title', $session->post_title );
    613613                $session_tracks       = get_the_terms( $session->ID, 'wcb_track' );
    614                 $session_track_titles = implode( ', ', wp_list_pluck( $session_tracks, 'name' ) );      // todo implode(): Invalid arguments passed in wc-post-types.php on line 612
     614                $session_track_titles = is_array( $session_tracks ) ? implode( ', ', wp_list_pluck( $session_tracks, 'name' ) ) : '';
    615615                $session_type         = get_post_meta( $session->ID, '_wcpt_session_type', true );
    616616
Note: See TracChangeset for help on using the changeset viewer.