mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-25 16:03:15 +00:00
app.net: Avaoid warnings if site is not reachable.
This commit is contained in:
parent
605d96a1c1
commit
adff04dca2
1 changed files with 8 additions and 0 deletions
|
@ -690,8 +690,12 @@ function appnet_fetchstream($a, $uid) {
|
||||||
}
|
}
|
||||||
catch (AppDotNetException $e) {
|
catch (AppDotNetException $e) {
|
||||||
logger("appnet_fetchstream: Error fetching stream for user ".$uid." ".appnet_error($e->getMessage()));
|
logger("appnet_fetchstream: Error fetching stream for user ".$uid." ".appnet_error($e->getMessage()));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!is_array($stream))
|
||||||
|
$stream = array();
|
||||||
|
|
||||||
$stream = array_reverse($stream);
|
$stream = array_reverse($stream);
|
||||||
foreach ($stream AS $post) {
|
foreach ($stream AS $post) {
|
||||||
$postarray = appnet_createpost($a, $uid, $post, $me, $user, $ownid, true);
|
$postarray = appnet_createpost($a, $uid, $post, $me, $user, $ownid, true);
|
||||||
|
@ -744,8 +748,12 @@ function appnet_fetchstream($a, $uid) {
|
||||||
}
|
}
|
||||||
catch (AppDotNetException $e) {
|
catch (AppDotNetException $e) {
|
||||||
logger("appnet_fetchstream: Error fetching mentions for user ".$uid." ".appnet_error($e->getMessage()));
|
logger("appnet_fetchstream: Error fetching mentions for user ".$uid." ".appnet_error($e->getMessage()));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!is_array($mentions))
|
||||||
|
$mentions = array();
|
||||||
|
|
||||||
$mentions = array_reverse($mentions);
|
$mentions = array_reverse($mentions);
|
||||||
foreach ($mentions AS $post) {
|
foreach ($mentions AS $post) {
|
||||||
$postarray = appnet_createpost($a, $uid, $post, $me, $user, $ownid, false);
|
$postarray = appnet_createpost($a, $uid, $post, $me, $user, $ownid, false);
|
||||||
|
|
Loading…
Reference in a new issue