From 9a75778b299e6ca2903fb51c0765be4dcb4f42e6 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Tue, 5 Jan 2016 15:00:34 +0100 Subject: [PATCH] If there's no Happening, we can't use the RSVP. --- plugins/Event/classes/RSVP.php | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/Event/classes/RSVP.php b/plugins/Event/classes/RSVP.php index 5c74bfee4f..90c9d25a8d 100644 --- a/plugins/Event/classes/RSVP.php +++ b/plugins/Event/classes/RSVP.php @@ -114,6 +114,7 @@ class RSVP extends Managed_DataObject while ($rsvp->fetch()) { $event = Happening::getKV('id', $rsvp->event_id); if (!$event instanceof Happening) { + $rsvp->delete(); continue; } $orig = clone($rsvp); -- 2.39.5