diff --git a/includes/class-sp-event.php b/includes/class-sp-event.php index d580044e..76f471af 100644 --- a/includes/class-sp-event.php +++ b/includes/class-sp-event.php @@ -579,16 +579,14 @@ class SP_Event extends SP_Custom_Post{ $appointments = array(); foreach ( $duties as $duty ) { - $duty_appointments = sp_array_value( $officials, $duty->term_id, null ); + $duty_appointments = sp_array_value( $officials, $duty->term_id, [] ); if ( ! $include_empty && empty( $duty_appointments ) ) continue; $appointed_officials = array(); - if ( is_array( $duty_appointments ) ) { - foreach ( $duty_appointments as $duty_appointment ) { - $appointed_officials[ $duty_appointment ] = get_the_title( $duty_appointment ); - } + foreach ( $duty_appointments as $duty_appointment ) { + $appointed_officials[ $duty_appointment ] = get_the_title( $duty_appointment ); } if ( $include_empty && empty( $appointed_officials ) ) $appointed_officials[] = $placeholder;