catch exception if user can't be resolved during update7
authorPhilipp Schüle <p.schuele@metaways.de>
Wed, 5 Aug 2015 16:08:05 +0000 (18:08 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Wed, 5 Aug 2015 17:50:22 +0000 (19:50 +0200)
Change-Id: Ifabb199529cdc4182eebfa23ded950dca9a6d760
Reviewed-on: http://gerrit.tine20.com/customers/2094
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Calendar/Setup/Update/Release8.php

index 46b9f9f..a2be8f8 100644 (file)
@@ -296,7 +296,12 @@ class Calendar_Setup_Update_Release8 extends Setup_Update_Abstract
             //find out displaycontainer
             if ($attendee['user_type'] != 'resource') {
                 $userAccountId = $contactUserMap[$attendee['user_id']];
-                $attendee['displaycontainerId'] = Calendar_Controller_Event::getDefaultDisplayContainerId($userAccountId);
+                try {
+                    $attendee['displaycontainerId'] = Calendar_Controller_Event::getDefaultDisplayContainerId($userAccountId);
+                } catch (Tinebase_Exception_NotFound $tenf) {
+                    Setup_Core::getLogger()->err(__METHOD__ . '::' . __LINE__ . " Could not find user with id " . $attendee['user_id']);
+                    continue;
+                }
             } else {
                 $attendee['displaycontainerId'] = $resourceContainerMap[$attendee['user_id']];
             }