Skip to content

Conversation

@TDannhauer
Copy link
Contributor

Handles access to Collections properties more defensive as they are optional according Protocol (..stated the internet... ;) )

Handles access to Collections properties more defensive as they are optional according Protocol (..stated the internet... ;)  )
@TDannhauer TDannhauer requested a review from Copilot January 14, 2026 10:41
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds defensive checks for optional properties in the $collection array when accessing bodyprefs and mimesupport fields. The changes prevent potential undefined index errors by using !empty() checks with appropriate default values.

Changes:

  • Added !empty() checks for bodyprefs and mimesupport collection properties across calendar, contacts, tasks, notes, and mail export functions
  • Standardized truncation handling for tasks and notes to match the pattern used in calendar and contacts
  • Updated error logging to include the same defensive checks for consistency

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants