Bugfix for PR 3630: "get_contact_details_by_url" not always returned a value

This commit is contained in:
Michael 2017-08-14 20:17:17 +00:00
commit 2d99e86b12
2 changed files with 6 additions and 5 deletions

View file

@ -39,7 +39,7 @@ function hovercard_content() {
// If a contact is connected the url is internally changed to "redir/CID". We need the pure url to search for
// the contact. So we strip out the contact id from the internal url and look in the contact table for
// the real url (nurl)
if(local_user() && strpos($profileurl, "redir/") === 0) {
if (local_user() && strpos($profileurl, "redir/") === 0) {
$cid = intval(substr($profileurl, 6));
$r = dba::select('contact', array('nurl', 'self'), array('id' => $cid), array('limit' => 1));
$profileurl = ($r["nurl"] ? $r["nurl"] : "");