make zot_finger more bulletproof

This commit is contained in:
friendica 2013-07-21 22:39:21 -07:00
parent 4680a818ea
commit 05612a8a77
2 changed files with 6 additions and 1 deletions

View File

@ -1437,7 +1437,7 @@ function item_store($arr,$force_parent = false) {
intval($arr['uid'])
);
if(count($r)) {
if($r) {
// is the new message multi-level threaded?
// even though we don't support it now, preserve the info

View File

@ -164,6 +164,11 @@ function zot_finger($webbie,$channel) {
$xchan_addr = $address . '@' . $host;
if((! $address) || (! $xchan_addr)) {
logger('zot_finger: no address :' . $webbie);
return array('success' => false);
}
$r = q("select xchan.*, hubloc.* from xchan
left join hubloc on xchan_hash = hubloc_hash
where xchan_addr = '%s' and (hubloc_flags & %d) limit 1",