From: Adam Magness Date: Mon, 15 Jan 2018 17:37:44 +0000 (-0500) Subject: Remove indexes X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8c878a7ad3a3c6bfa0b8217e854e0e2629804059;p=friendica.git Remove indexes remove [0] from selectFirst objects --- diff --git a/src/Model/Mail.php b/src/Model/Mail.php index f1021bb772..a0474f7557 100644 --- a/src/Model/Mail.php +++ b/src/Model/Mail.php @@ -67,10 +67,10 @@ class Mail if (!$convid) { // create a new conversation - $recip_host = substr($contact[0]['url'], strpos($contact[0]['url'], '://') + 3); + $recip_host = substr($contact['url'], strpos($contact['url'], '://') + 3); $recip_host = substr($recip_host, 0, strpos($recip_host, '/')); - $recip_handle = (($contact[0]['addr']) ? $contact[0]['addr'] : $contact[0]['nick'] . '@' . $recip_host); + $recip_handle = (($contact['addr']) ? $contact['addr'] : $contact['nick'] . '@' . $recip_host); $sender_handle = $a->user['nickname'] . '@' . substr(System::baseUrl(), strpos(System::baseUrl(), '://') + 3); $conv_guid = get_guid(32); @@ -102,9 +102,9 @@ class Mail 'uid' => local_user(), 'guid' => $guid, 'convid' => $convid, - 'from-name' => $me[0]['name'], - 'from-photo' => $me[0]['thumb'], - 'from-url' => $me[0]['url'], + 'from-name' => $me['name'], + 'from-photo' => $me['thumb'], + 'from-url' => $me['url'], 'contact-id' => $recipient, 'title' => $subject, 'body' => $body,