Skip to content

Commit

Permalink
SUP-71660 Avoid unspecified array key warnings in wp-civicrm-ux / ful…
Browse files Browse the repository at this point in the history
…lcalendar colour code
  • Loading branch information
agileware-fj authored and agileware-dev committed Mar 13, 2024
1 parent a69e78e commit c6a78ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rest/json-all-events.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ protected function generate_event_html($event, $upload, $colors, $image_src_fiel
$template = '<div class="civicrm-ux-event-listing">';
$template .= $event[$image_src_field] ? '<div class="civicrm-ux-event-listing-image"><img src="' . $image_url . '"></div>' : '';

$template .= '<div class="civicrm-ux-event-listing-type" style="background-color: ' . (count($colors) > 0 ? '#' . $colors[$event['event_type_id:label']] : '#333333') . ';">' . $event['event_type_id:label'] . '</div>
$template .= '<div class="civicrm-ux-event-listing-type" style="background-color: #' . ($colors[$event['event_type_id:label']] ?? '333333') . ';">' . $event['event_type_id:label'] . '</div>
<div class="civicrm-ux-event-listing-name">' . $event['title'] . '</div>
<div class="civicrm-ux-event-listing-date"><i class="fa fa-calendar-o"></i><span class="event-time-text">' . $event_time . '</span></div>
<div class="civicrm-ux-event-listing-location"><i class="fa fa-map-marker"></i><span class="event-time-text">' . $event_location . '</span></div>';
Expand Down Expand Up @@ -264,4 +264,4 @@ protected static function sameDay( $d1, $d2 ) {
return ( $d1->format( 'j' ) == $d2->format( 'j' ) ) && ( $d1->format( 'f' ) == $d2->format( 'f' ) ) && ( $d1->format( 'Y' ) == $d2->format( 'Y' ) );
}

}
}

0 comments on commit c6a78ea

Please sign in to comment.