From: Jan Schneider Date: Fri, 12 Mar 2010 16:06:42 +0000 (+0100) Subject: Catch unserialization error. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=8b29c593a5b4d1351a742a7805152dee60d7ed44;p=horde.git Catch unserialization error. --- diff --git a/horde/lib/Block/twitter_timeline.php b/horde/lib/Block/twitter_timeline.php index 2bd4ccae9..56d37c409 100644 --- a/horde/lib/Block/twitter_timeline.php +++ b/horde/lib/Block/twitter_timeline.php @@ -130,7 +130,9 @@ class Horde_Block_Horde_twitter_timeline extends Horde_Block $stream = Horde_Serialize::unserialize($twitter->statuses->friendsTimeline(), Horde_Serialize::JSON); } catch (Horde_Service_Twitter_Exception $e) { $msg = Horde_Serialize::unserialize($e->getMessage(), Horde_Serialize::JSON); - return sprintf(_("There was an error contacting Twitter: %s"), $msg->error); + return $msg + ? sprintf(_("There was an error contacting Twitter: %s"), $msg->error) + : _("There was an error contacting Twitter."); } /* Latest status */ if (empty($this->_profile->status)) {