[Pkg-owncloud-commits] [php-sabre-vobject] 35/106: If clause before	loop makes more sense.
    David Prévot 
    taffit at moszumanska.debian.org
       
    Fri Aug 22 15:10:59 UTC 2014
    
    
  
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabre-vobject.
commit e488af7ad52eb8ce3500edd68e1470204ee0ff54
Author: Evert Pot <me at evertpot.com>
Date:   Wed Jul 23 18:02:16 2014 -0400
    If clause before loop makes more sense.
---
 lib/Sabre/VObject/ITip/Broker.php | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/Sabre/VObject/ITip/Broker.php b/lib/Sabre/VObject/ITip/Broker.php
index 23865c9..e83ddd5 100644
--- a/lib/Sabre/VObject/ITip/Broker.php
+++ b/lib/Sabre/VObject/ITip/Broker.php
@@ -289,13 +289,15 @@ class Broker {
                 unset($instances[$recurId]);
             }
         }
+
+        if(!$masterObject) {
+            // No master object, we can't add new instances.
+            return null;
+        }
         // If we got replies to instances that did not exist in the
         // original list, it means that new exceptions must be created.
         foreach($instances as $recurId=>$partstat) {
-            if(!$masterObject) {
-                // No master object, we can't add new instances.
-                return null;
-            }
+
             $newObject = clone $masterObject;
             unset(
                 $newObject->RRULE,
-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabre-vobject.git
    
    
More information about the Pkg-owncloud-commits
mailing list