avoid undefined variable errors
authorMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 12 Aug 2010 17:00:39 +0000 (13:00 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 12 Aug 2010 17:00:39 +0000 (13:00 -0400)
horde/services/facebook.php

index 28ff76c..2f5db7e 100644 (file)
@@ -51,7 +51,7 @@ if ($token = Horde_Util::getFormData('auth_token')) {
             $filter = Horde_Util::getPost('filter');
             $stream = $facebook->streams->get('', array(), Horde_Util::getPost('oldest'), Horde_Util::getPost('newest'), $count, $filter);
         } catch (Horde_Service_Facebook_Exception $e) {
-            $html .= sprintf(_("There was an error making the request: %s"), $e->getMessage());
+            $html = sprintf(_("There was an error making the request: %s"), $e->getMessage());
             $html .= sprintf(_("You can also check your Facebook settings in your %s."), Horde::getServiceLink('options', 'horde')->add('group', 'facebook')->link() . _("preferences") . '</a>');
 
             return $html;
@@ -68,7 +68,7 @@ if ($token = Horde_Util::getFormData('auth_token')) {
                 . ' ' . _("Friend Requests:") . ' ' . count($notifications['friend_requests'])
                 . ' ' . _("Event Invites:") . ' ' . count($notifications['event_invites']);
             } catch (Horde_Service_Facebook_Exception $e) {
-                $html .= sprintf(_("There was an error making the request: %s"), $e->getMessage());
+                $html = sprintf(_("There was an error making the request: %s"), $e->getMessage());
                 $html .= sprintf(_("You can also check your Facebook settings in your %s."), Horde::getServiceLink('options', 'horde')->add('group', 'facebook')->link() . _("preferences") . '</a>');
 
                 return $html;