No PEAR_Error anymore.
authorJan Schneider <jan@horde.org>
Thu, 3 Jun 2010 11:32:51 +0000 (13:32 +0200)
committerJan Schneider <jan@horde.org>
Thu, 3 Jun 2010 11:32:51 +0000 (13:32 +0200)
framework/Ui/lib/Horde/Ui/VarRenderer/Html.php

index 27634a4..5bce4bf 100644 (file)
@@ -1009,8 +1009,9 @@ EOT;
                 // Get rid of the trailing @ (when no host is included in
                 // the email address).
                 $address = str_replace('@>', '>', $address);
-                $mail_link = $GLOBALS['registry']->call('mail/compose', array(array('to' => addslashes($address))));
-                if (is_a($mail_link, 'PEAR_Error')) {
+                try {
+                    $mail_link = $GLOBALS['registry']->call('mail/compose', array(array('to' => addslashes($address))));
+                } catch (Horde_Exception $e) {
                     $mail_link = 'mailto:' . urlencode($address);
                 }