Avoid an empty handle

This commit is contained in:
Michael Vogel 2016-03-22 07:13:56 +01:00 committed by Roland Haeder
parent eb511b3fef
commit 3414328673
No known key found for this signature in database
GPG Key ID: B72F8185C6C7BD78

View File

@ -647,7 +647,7 @@ class diaspora {
if($contact['addr'] != "")
$handle = $contact['addr'];
elseif(($contact['network'] === NETWORK_DFRN) || ($contact['self'] == 1)) {
else {
$baseurl_start = strpos($contact['url'],'://') + 3;
$baseurl_length = strpos($contact['url'],'/profile') - $baseurl_start; // allows installations in a subdirectory--not sure how Diaspora will handle
$baseurl = substr($contact['url'], $baseurl_start, $baseurl_length);