do not try to remove non-existant attender
authorPhilipp Schüle <p.schuele@metaways.de>
Mon, 16 Nov 2015 09:15:10 +0000 (10:15 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 16 Nov 2015 17:28:17 +0000 (18:28 +0100)
Change-Id: I0087b6a5eae9326dcf993e770b6af18a5feabd1a
Reviewed-on: http://gerrit.tine20.com/customers/2376
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Calendar/Controller/Event.php

index c89403e..80da1ff 100644 (file)
@@ -681,7 +681,9 @@ class Calendar_Controller_Event extends Tinebase_Controller_Record_Abstract impl
                     }
                     foreach ($attendeeDiff['removed'] as $attenderToRemove) {
                         $attenderInCurrentSet = Calendar_Model_Attender::getAttendee($event->attendee, $attenderToRemove);
-                        $event->attendee->removeRecord($attenderInCurrentSet);
+                        if ($attenderInCurrentSet) {
+                            $event->attendee->removeRecord($attenderInCurrentSet);
+                        }
                     }
                 } else {
                     // remove ids of new attendee