dav: Fix fatal error when ORGANIZER is missing in CalDAV schedule#59299
Conversation
tcitworld
left a comment
There was a problem hiding this comment.
Fix looks good enough, I just wonder if there's a way that $adresses could contain the null value. In that case we better check that $vevent->ORGANIZER?->getNormalizedValue() isn't null outside the in_array condition first.
|
Thanks for the review! I encountered this bug while syncing Google Calendar events to Nextcloud using vdirsyncer. Some events from Google don't seem to have a technical 'Organizer' field, which leads to the fatal error. Since I'm not a PHP expert, I'm not sure if $addresses could ever contain a null value in this context. If you think an explicit check for null is safer, please let me know and I'll try to update the code accordingly! |
To resolve please change the ocmmit message like
(the current message fails, because "dav" isn't valid. It must be either fix, feat, refactor, chore, test, ci). |
826230a to
32a9191
Compare
|
@kesselb @tcitworld |
Signed-off-by: AlessioDiPretoroAsdea <alessio.dipretoro@asdeahw.net>
32a9191 to
85b851a
Compare
|
/backport to stable33 |
|
/backport to stable32 |
|
Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22 |
Summary
This PR fixes a
Fatal Error: Call to a member function getNormalizedValue() on nullin the CalDAV Schedule Plugin.The error occurs when an event (e.g., synchronized from external sources like Google Calendar) does not contain an
ORGANIZERproperty. Using the PHP 8 null-safe operator ensures the synchronization doesn't crash with a 500 error.Checklist
AI (if applicable)