Merge pull request #218 from annando/1410-statusnet-connect-problems

Statusnet: Improved error handling
pull/223/head
tobiasd 2014-10-17 14:56:02 +02:00
commit e7e63a09c6
1 changed files with 10 additions and 1 deletions

View File

@ -1338,7 +1338,16 @@ function statusnet_fetchhometimeline($a, $uid) {
$items = $connection->get('statuses/home_timeline', $parameters); $items = $connection->get('statuses/home_timeline', $parameters);
if (!is_array($items)) { if (!is_array($items)) {
logger("statusnet_fetchhometimeline: Error fetching home timeline: ".print_r($items, true), 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; return;
} }