0012122: continue statement failure
authorPhilipp Schüle <p.schuele@metaways.de>
Thu, 18 Aug 2016 09:41:56 +0000 (11:41 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Fri, 19 Aug 2016 07:23:23 +0000 (09:23 +0200)
handle skipping of share correctly

... need to use "continue 2" as continue only
 breaks from the switch statement

see Note on
http://php.net/manual/en/control-structures.continue.php

https://forge.tine20.org/view.php?id=12122

Change-Id: I83e0479a4366e4d6dc734322c2fce721324bcaa4
Reviewed-on: http://gerrit.tine20.com/customers/3463
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
Tested-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Calendar/Frontend/WebDAV/Container.php

index c0da839..4f21355 100644 (file)
@@ -368,7 +368,7 @@ class Calendar_Frontend_WebDAV_Container extends Tinebase_WebDav_Container_Abstr
                     try {
                         $list       = Tinebase_Group::getInstance()->getGroupById($grant->account_id);
                     } catch (Tinebase_Exception_NotFound $tenf) {
-                        continue;
+                        continue 2;
                     }
 
                     // was: '/principals/groups/'
@@ -379,12 +379,12 @@ class Calendar_Frontend_WebDAV_Container extends Tinebase_WebDav_Container_Abstr
                     
                 case 'user':
                     if ((string)$this->_container->owner_id === (string)$grant->account_id) {
-                        continue;
+                        continue 2;
                     }
                     try {
                         $contact = Tinebase_User::getInstance()->getUserByPropertyFromSqlBackend('accountId', $grant->account_id);
                     } catch (Tinebase_Exception_NotFound $tenf) {
-                        continue;
+                        continue 2;
                     }
 
                     // was: '/principals/users/'