From 6313e8dd95505c46c3b25d102b233846072a7125 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 11 Dec 2025 18:35:45 +0100 Subject: [PATCH] Check node type before getOwner() call Fixes #1345 --- lib/CalDAV/Schedule/Plugin.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/CalDAV/Schedule/Plugin.php b/lib/CalDAV/Schedule/Plugin.php index 8577ae9f70..2ce267ebf4 100644 --- a/lib/CalDAV/Schedule/Plugin.php +++ b/lib/CalDAV/Schedule/Plugin.php @@ -378,7 +378,7 @@ public function beforeUnbind($path) $node = $this->server->tree->getNodeForPath($path); - if (!$node instanceof ICalendarObject || $node instanceof ISchedulingObject) { + if (!$node instanceof ICalendarObject || $node instanceof ISchedulingObject || !$node instanceof DAVACL\IACL) { return; } @@ -386,10 +386,13 @@ public function beforeUnbind($path) return; } - $addresses = $this->getAddressesForPrincipal( - $node->getOwner() - ); + $owner = $node->getOwner(); + + if (!$owner) { + return; + } + $addresses = $this->getAddressesForPrincipal($owner); $broker = $this->createITipBroker(); $messages = $broker->parseEvent(null, $addresses, $node->get());