From f3cae4bf0ca03f7e44240a313e38a3812196d61c Mon Sep 17 00:00:00 2001
From: Michael <heluecht@pirati.ca>
Date: Sun, 5 May 2019 14:12:43 +0000
Subject: [PATCH] Fixes notices

---
 src/Model/Contact.php | 4 ++++
 src/Model/Item.php    | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/Model/Contact.php b/src/Model/Contact.php
index 27ac3d33e..181f7a5e4 100644
--- a/src/Model/Contact.php
+++ b/src/Model/Contact.php
@@ -2373,6 +2373,10 @@ class Contact extends BaseObject
 	 */
 	public static function magicLinkByContact($contact, $url = '')
 	{
+		if (empty($contact['id']) || empty($contact['uid'])) {
+			return $url ?: $contact['url'];
+		}
+
 		if ((!local_user() && !remote_user()) || ($contact['network'] != Protocol::DFRN)) {
 			return $url ?: $contact['url']; // Equivalent to ($url != '') ? $url : $contact['url'];
 		}
diff --git a/src/Model/Item.php b/src/Model/Item.php
index 387014d4b..0882f316d 100644
--- a/src/Model/Item.php
+++ b/src/Model/Item.php
@@ -45,7 +45,7 @@ class Item extends BaseObject
 
 	// Field list that is used to display the items
 	const DISPLAY_FIELDLIST = [
-		'uid', 'id', 'parent', 'uri', 'thr-parent', 'parent-uri', 'guid', 'network', 'gravity',
+		'uid', 'id', 'parent', 'uri', 'thr-parent', 'parent-uri', 'guid', 'parent-guid', 'network', 'gravity',
 		'commented', 'created', 'edited', 'received', 'verb', 'object-type', 'postopts', 'plink',
 		'wall', 'private', 'starred', 'origin', 'title', 'body', 'file', 'attach', 'language',
 		'content-warning', 'location', 'coord', 'app', 'rendered-hash', 'rendered-html', 'object',