mirror of
https://github.com/friendica/friendica
synced 2024-11-10 07:02:54 +00:00
Merge pull request #4595 from annando/empty-contact
Avoid an error in OnePoll when the contact was "null".
This commit is contained in:
commit
f351391f17
2 changed files with 6 additions and 5 deletions
|
@ -228,7 +228,7 @@ function add_page_info_to_body($body, $texturl = false, $no_photos = false) {
|
||||||
*
|
*
|
||||||
* @TODO find proper type-hints
|
* @TODO find proper type-hints
|
||||||
*/
|
*/
|
||||||
function consume_feed($xml, $importer, &$contact, &$hub, $datedir = 0, $pass = 0) {
|
function consume_feed($xml, $importer, $contact, &$hub, $datedir = 0, $pass = 0) {
|
||||||
if ($contact['network'] === NETWORK_OSTATUS) {
|
if ($contact['network'] === NETWORK_OSTATUS) {
|
||||||
if ($pass < 2) {
|
if ($pass < 2) {
|
||||||
// Test - remove before flight
|
// Test - remove before flight
|
||||||
|
|
|
@ -582,11 +582,12 @@ class OnePoll
|
||||||
|
|
||||||
logger("Consume feed of contact ".$contact['id']);
|
logger("Consume feed of contact ".$contact['id']);
|
||||||
|
|
||||||
consume_feed($xml, $importer, $contact, $hub, 1, 1);
|
consume_feed($xml, $importer, $contact, $hub);
|
||||||
|
|
||||||
// do it twice. Ensures that children of parents which may be later in the stream aren't tossed
|
// do it a second time for DFRN so that any children find their parents.
|
||||||
|
if ($contact['network'] === NETWORK_DFRN) {
|
||||||
consume_feed($xml, $importer, $contact, $hub, 1, 2);
|
consume_feed($xml, $importer, $contact, $hub);
|
||||||
|
}
|
||||||
|
|
||||||
$hubmode = 'subscribe';
|
$hubmode = 'subscribe';
|
||||||
if ($contact['network'] === NETWORK_DFRN || $contact['blocked'] || $contact['readonly']) {
|
if ($contact['network'] === NETWORK_DFRN || $contact['blocked'] || $contact['readonly']) {
|
||||||
|
|
Loading…
Reference in a new issue