From: Hypolite Petovan <hypolite@mrpetovan.com>
Date: Tue, 24 Dec 2019 20:37:35 +0000 (-0500)
Subject: Ensure pubkey key is present in APContact::getByUrl result
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=17c252f3c770e32291ae3667d53dcd750d6f334a;p=friendica.git

Ensure pubkey key is present in APContact::getByUrl result

- Addresses https://github.com/friendica/friendica/issues/8000#issuecomment-568799866
---

diff --git a/src/Model/APContact.php b/src/Model/APContact.php
index e3c3a0a12b..c535034487 100644
--- a/src/Model/APContact.php
+++ b/src/Model/APContact.php
@@ -192,6 +192,7 @@ class APContact extends BaseObject
 			$apcontact['addr'] = '';
 		}
 
+		$apcontact['pubkey'] = null;
 		if (!empty($compacted['w3id:publicKey'])) {
 			$apcontact['pubkey'] = trim(JsonLD::fetchElement($compacted['w3id:publicKey'], 'w3id:publicKeyPem', '@value'));
 		}