From d9f0102094d691b70198608dbeb6075f8f6fd263 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Tue, 14 Oct 2014 19:01:26 +0200 Subject: [PATCH] The changed error handling hadn't behaved like expected. --- statusnet/statusnet.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/statusnet/statusnet.php b/statusnet/statusnet.php index 959d598a9..c8b702d19 100644 --- a/statusnet/statusnet.php +++ b/statusnet/statusnet.php @@ -1338,7 +1338,16 @@ function statusnet_fetchhometimeline($a, $uid) { $items = $connection->get('statuses/home_timeline', $parameters); if (!is_array($items)) { - logger("statusnet_fetchhometimeline: Error fetching home timeline: ".$items, LOGGER_DEBUG); + if (is_object($items) AND isset($items->error)) + $errormsg = $items->error; + elseif (is_object($items)) + $errormsg = print_r($items, true); + elseif (is_string($items) OR is_float($items) OR is_int($items)) + $errormsg = $items; + else + $errormsg = "Unknown error"; + + logger("statusnet_fetchhometimeline: Error fetching home timeline: ".$errormsg, LOGGER_DEBUG); return; }