mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-25 14:03:16 +00:00
The changed error handling hadn't behaved like expected.
This commit is contained in:
parent
467f1f00f2
commit
d9f0102094
1 changed files with 10 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue