From 00570ff2838d5f76605399382d034322db92cc40 Mon Sep 17 00:00:00 2001 From: emkael Date: Thu, 14 Apr 2016 13:29:55 +0200 Subject: * removing calendar preference only if such exists --- app/php/facades/CalendarFacade.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/php/facades/CalendarFacade.php b/app/php/facades/CalendarFacade.php index cee345b..4b00a03 100644 --- a/app/php/facades/CalendarFacade.php +++ b/app/php/facades/CalendarFacade.php @@ -44,7 +44,9 @@ class CalendarFacade extends Facade { $user->DbRecord->ID, $calendarID ); - $preferenceRecord->delete(); + if ($preferenceRecord) { + $preferenceRecord->delete(); + } } } -- cgit v1.2.3