Check for pear_error being returned from Horde_Share
authorMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 8 Apr 2010 19:53:41 +0000 (15:53 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 8 Apr 2010 19:53:41 +0000 (15:53 -0400)
kronolith/lib/Driver/Sql.php

index 9e18896..43428f4 100644 (file)
@@ -595,6 +595,9 @@ class Kronolith_Driver_Sql extends Kronolith_Driver
 
             /* Add tags again, but as the share owner (replaceTags removes ALL tags). */
             $cal = $GLOBALS['kronolith_shares']->getShare($event->calendar);
+            if ($cal instanceof PEAR_Error) {
+                throw new Kronolith_Exception($cal);
+            }
             $tagger->tag($event->uid, $event->tags, $cal->get('owner'), 'event');
 
             /* Update Geolocation */