X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Fitems.php;h=848c21df366d405d16a00b24eaadbd0b36c58847;hb=5b96c7b3e39a4dd6516115e0fb187cc0ecc0e07d;hp=45d25e379f84713931de7ba41653b6a2c826a681;hpb=75998b62de742858c818d432b2a0bad848bb177a;p=friendica.git diff --git a/include/items.php b/include/items.php index 45d25e379f..848c21df36 100644 --- a/include/items.php +++ b/include/items.php @@ -2977,9 +2977,6 @@ function item_is_remote_self($contact, &$datarray) { $datarray['private'] = 0; } - //if (!isset($datarray["app"]) OR ($datarray["app"] == "")) - // $datarray["app"] = network_to_name($contact['network']); - if ($contact['network'] != NETWORK_FEED) { // Store the original post $r = item_store($datarray2, false, false); @@ -4159,9 +4156,12 @@ function new_follower($importer,$contact,$datarray,$item,$sharing = false) { $name = notags(trim($datarray['author-name'])); $photo = notags(trim($datarray['author-avatar'])); - $rawtag = $item->get_item_tags(NAMESPACE_ACTIVITY,'actor'); - if($rawtag && $rawtag[0]['child'][NAMESPACE_POCO]['preferredUsername'][0]['data']) - $nick = $rawtag[0]['child'][NAMESPACE_POCO]['preferredUsername'][0]['data']; + if (is_object($item)) { + $rawtag = $item->get_item_tags(NAMESPACE_ACTIVITY,'actor'); + if($rawtag && $rawtag[0]['child'][NAMESPACE_POCO]['preferredUsername'][0]['data']) + $nick = $rawtag[0]['child'][NAMESPACE_POCO]['preferredUsername'][0]['data']; + } else + $nick = $item; if(is_array($contact)) { if(($contact['network'] == NETWORK_OSTATUS && $contact['rel'] == CONTACT_IS_SHARING)