Make sure that $url is a Horde_Url, and only try to add it if we make a successful...
authorChuck Hagenbuch <chuck@horde.org>
Sun, 8 Aug 2010 14:46:51 +0000 (10:46 -0400)
committerChuck Hagenbuch <chuck@horde.org>
Sun, 8 Aug 2010 14:46:51 +0000 (10:46 -0400)
ansel/lib/Widget/Actions.php

index bcaa42c..d49b551 100644 (file)
@@ -122,8 +122,9 @@ class Ansel_Widget_Actions extends Ansel_Widget_Base
 
             try {
                 $url = $registry->bookmarks->getAddUrl($api_params);
+                $url = new Horde_Url($url);
+                $html .= '<li>' . $url->link(array('class' => 'widget')) . Horde::img(Horde_Themes::img('trean.png', 'trean')) . ' ' . _("Add to bookmarks") . '</a></li>';
             } catch (Horde_Exception $e) {}
-            $html .= '<li>' . $url->link(array('class' => 'widget')) . Horde::img(Horde_Themes::img('trean.png', 'trean')) . ' ' . _("Add to bookmarks") . '</a></li>';
         }
 
         /* Download as ZIP link */