Fix rare fatal error in caldav_calendar class and some PHP8 warnings
This commit is contained in:
parent
4bc6a82a13
commit
dcfd95fd1f
3 changed files with 11 additions and 11 deletions
|
@ -3464,7 +3464,7 @@ $("#rcmfd_new_category").keypress(function(event) {
|
|||
$update_attendees[] = $attendee;
|
||||
$metadata['fallback'] = $attendee['status'];
|
||||
$metadata['attendee'] = $attendee['email'];
|
||||
$metadata['rsvp'] = !empty($attendee['rsvp']) || $attendee['role'] != 'NON-PARTICIPANT';
|
||||
$metadata['rsvp'] = !empty($attendee['rsvp']) || empty($attendee['role']) || $attendee['role'] != 'NON-PARTICIPANT';
|
||||
|
||||
$existing_attendee_emails = [];
|
||||
|
||||
|
|
|
@ -64,14 +64,17 @@ class caldav_calendar extends kolab_storage_dav_folder
|
|||
// $this->storage = kolab_storage_dav::get_folder($folder_or_id, 'event');
|
||||
}
|
||||
|
||||
$this->cal = $calendar;
|
||||
$this->id = $this->storage->id;
|
||||
$this->attributes = $this->storage->attributes;
|
||||
$this->ready = true;
|
||||
$this->alarms = !isset($this->storage->attributes['alarms']) || $this->storage->attributes['alarms'];
|
||||
$this->cal = $calendar;
|
||||
$this->ready = !empty($this->storage);
|
||||
|
||||
// Set writeable and alarms flags according to folder permissions
|
||||
if ($this->ready) {
|
||||
$this->id = $this->storage->id;
|
||||
$this->attributes = $this->storage->attributes;
|
||||
$this->default = $this->storage->default;
|
||||
$this->subtype = $this->storage->subtype;
|
||||
$this->alarms = !isset($this->attributes['alarms']) || $this->attributes['alarms'];
|
||||
|
||||
if ($this->storage->get_namespace() == 'personal') {
|
||||
$this->editable = true;
|
||||
$this->rights = 'lrswikxteav';
|
||||
|
@ -86,9 +89,6 @@ class caldav_calendar extends kolab_storage_dav_folder
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->default = $this->storage->default;
|
||||
$this->subtype = $this->storage->subtype;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -162,8 +162,8 @@ class carddav_contacts_driver
|
|||
$result = $storage->folder_update($prop);
|
||||
|
||||
if ($result && ($abook = $this->get_address_book($prop['id'] ?: $result))) {
|
||||
$abook->id = $prop['id'] ?: $result;
|
||||
$props = $this->abook_prop($abook->id, $abook);
|
||||
$abook_id = $prop['id'] ?: $result;
|
||||
$props = $this->abook_prop($abook_id, $abook);
|
||||
|
||||
$this->rc->output->show_message('kolab_addressbook.book'.$type.'d', 'confirmation');
|
||||
$this->rc->output->command('book_update', $props, $prop['id']);
|
||||
|
|
Loading…
Add table
Reference in a new issue