Skip to content

Commit

Permalink
FIX: prevent php 8 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
noec764 committed Apr 14, 2023
1 parent 8b05047 commit ee99954
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions localization/fr_FR.inc
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ $labels['main_calendar_error'] = "Vous devez selectionner un calendrier par déf
$labels['no_title'] = "Un événement sans titre";
$labels['main_calendar_not_exist'] = "Le calendrier choisis comme principal n'existe pas ou plus sur votre serveur";
$labels['no_calendar_found'] = "Aucun Calendrier n'est disponible sur votre server";
$labels['invitation_without_event_inside'] = "Vous avez reçu une invitation sans événement";


?>
15 changes: 9 additions & 6 deletions roundcube_caldav.php
Original file line number Diff line number Diff line change
Expand Up @@ -610,17 +610,20 @@ function send_info_to_be_displayed_to_client(rcube_message &$message, $attachmen

set_sender_and_receiver_email($message, $response);

foreach ($events as $event) {
$first_event = array_shift($events);
if (empty($first_event)) {
$this->rcmail->output->command('display_message', $this->gettext('invitation_without_event_inside'), 'error');
return;
}

$same_uid = $first_event->uid;
foreach ($events as $i => &$event) {
if_no_dtend_add_one_to_event($event);
$response['recurrent_events'][$event->uid][] = $this->pretty_date(
$event->dtstart_array[1],
$event->dtend_array[1]
);
}

$same_uid = $events[0]->uid;

foreach ($events as $i => &$event) {

// Si l'evenement à le même uid que son prédecesseur on ne l'affiche pas
if ($same_uid == $event->uid && $i != 0) {
continue;
Expand Down

0 comments on commit ee99954

Please sign in to comment.