This is the place with the exception.
authorJan Schneider <jan@horde.org>
Fri, 11 Dec 2009 15:30:57 +0000 (16:30 +0100)
committerJan Schneider <jan@horde.org>
Fri, 11 Dec 2009 15:30:57 +0000 (16:30 +0100)
turba/lib/Turba.php

index 7443fab..97369da 100644 (file)
@@ -20,11 +20,7 @@ class Turba {
         static $batchCompose;
 
         if (!isset($batchCompose)) {
-            try {
-                $batchCompose = $registry->hasMethod('mail/batchCompose');
-            } catch (Horde_Exception $e) {
-                $batchCompose = false;
-            }
+            $batchCompose = $registry->hasMethod('mail/batchCompose');
         }
 
         $array = is_array($data);
@@ -55,7 +51,11 @@ class Turba {
         }
 
         if ($batchCompose) {
-            $addresses = $GLOBALS['registry']->call('mail/batchCompose', array($addresses));
+            try {
+                $addresses = $GLOBALS['registry']->call('mail/batchCompose', array($addresses));
+            } catch (Horde_Exception $e) {
+                $batchCompose = false;
+            }
         }
 
         foreach ($data as $i => $email_vals) {