Skip to content

Commit

Permalink
EICNET-2948: strtotime() does not accept NULL values
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitriskr committed Mar 4, 2024
1 parent afb7e44 commit 509944e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/themes/eic_community/includes/preprocess/groups/event.inc
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ function eic_community_preprocess_group__event(&$variables) {
$event_start_date = strtotime($group->get('field_date_range')->value);
$event_end_date = strtotime($group->get('field_date_range')->end_value);
$event_date_status = \Drupal::service('eic_helper.datetime')->getDateRangeStatus($group, 'field_date_range');
$registration_start_date = strtotime($group->get('field_event_registration_date')->value);
$registration_end_date = strtotime($group->get('field_event_registration_date')->end_value);
$registration_start_date = $group->get('field_event_registration_date')->value ? strtotime($group->get('field_event_registration_date')->value) : NULL;
$registration_end_date = $group->get('field_event_registration_date')->end_value ? strtotime($group->get('field_event_registration_date')->end_value) : NULL;
$registration_status = \Drupal::service('eic_helper.datetime')->getDateRangeStatus(
$group,
'field_event_registration_date'
Expand Down

0 comments on commit 509944e

Please sign in to comment.