Better behaviour when contact wasn't found.
This commit is contained in:
parent
fb72871f66
commit
419a3ab2d3
1 changed files with 18 additions and 19 deletions
|
@ -128,7 +128,7 @@ function item_post(&$a) {
|
||||||
intval($parent_item['contact-id']),
|
intval($parent_item['contact-id']),
|
||||||
intval($uid)
|
intval($uid)
|
||||||
);
|
);
|
||||||
if(count($r)) {
|
if(count($r))
|
||||||
$parent_contact = $r[0];
|
$parent_contact = $r[0];
|
||||||
|
|
||||||
// If the contact id doesn't fit with the contact, then set the contact to null
|
// 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["micro"] = $probed_contact["photo"];
|
||||||
$parent_contact["addr"] = $probed_contact["addr"];
|
$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);
|
logger('no contact found: '.print_r($thrparent, true), LOGGER_DEBUG);
|
||||||
}
|
} else
|
||||||
|
logger('parent contact: '.print_r($parent_contact, true), LOGGER_DEBUG);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue