Better behaviour when contact wasn't found.

This commit is contained in:
Michael Vogel 2015-06-08 01:19:40 +02:00
parent fb72871f66
commit 419a3ab2d3

View file

@ -128,7 +128,7 @@ function item_post(&$a) {
intval($parent_item['contact-id']),
intval($uid)
);
if(count($r)) {
if(count($r))
$parent_contact = $r[0];
// If the contact id doesn't fit with the contact, then set the contact to null
@ -146,10 +146,9 @@ function item_post(&$a) {
$parent_contact["micro"] = $probed_contact["photo"];
$parent_contact["addr"] = $probed_contact["addr"];
}
logger('parent contact: '.print_r($parent_contact, true), LOGGER_DEBUG);
} else
logger('no contact found: '.print_r($thrparent, true), LOGGER_DEBUG);
}
} else
logger('parent contact: '.print_r($parent_contact, true), LOGGER_DEBUG);
}
}