prevents fatal error if own attender can not be found
authorPhilipp Schüle <p.schuele@metaways.de>
Tue, 1 Sep 2015 07:54:21 +0000 (09:54 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Tue, 1 Sep 2015 12:24:10 +0000 (14:24 +0200)
Change-Id: Ibfa8e9d6c4acec9453c60b2a0ad22a362f1ff4bc
Reviewed-on: http://gerrit.tine20.com/customers/2152
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Calendar/Controller/MSEventFacade.php

index 446a88c..784c4c7 100644 (file)
@@ -55,7 +55,9 @@ class Calendar_Controller_MSEventFacade implements Tinebase_Controller_Record_In
     private static $_instance = NULL;
     
     protected static $_attendeeEmailCache = array();
-    
+
+    protected $_currentEventFacadeContainer;
+
     /**
      * the constructor
      *
@@ -418,12 +420,15 @@ class Calendar_Controller_MSEventFacade implements Tinebase_Controller_Record_In
         if ($ownAttender) {
             $currentEvent = $this->_eventController->get($event->id);
             $currentAttender = Calendar_Model_Attender::getAttendee($currentEvent->attendee, $ownAttender);
-            $ownAttender->status_authkey = $currentAttender->status_authkey;
+            if ($currentAttender) {
+                $ownAttender->status_authkey = $currentAttender->status_authkey;
+            } else {
+                if (Tinebase_Core::isLogLevel(Zend_Log::NOTICE)) Tinebase_Core::getLogger()->notice(__METHOD__ . '::' . __LINE__
+                    . ' currentAttender not found in currentEvent: ' . print_r($currentEvent->toArray(), true));
+            }
         }
     }
     
-    protected $_currentEventFacadeContainer;
-    
     /**
      * asserts correct event filter and calendar user in MSEventFacade
      *