From 8b29c593a5b4d1351a742a7805152dee60d7ed44 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Fri, 12 Mar 2010 17:06:42 +0100 Subject: [PATCH] Catch unserialization error. --- horde/lib/Block/twitter_timeline.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)) { -- 2.11.0