]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/APContact.php
Support Blurhash
[friendica.git] / src / Model / APContact.php
index 3b568f39f1d85c5c7be8880668adfe97d7c94e43..67ce2b66bf73d9c689ef5f778404edc42c1fb358 100644 (file)
@@ -305,8 +305,8 @@ class APContact
 
                $apcontact['pubkey'] = null;
                if (!empty($compacted['w3id:publicKey'])) {
-                       $apcontact['pubkey'] = trim(JsonLD::fetchElement($compacted['w3id:publicKey'], 'w3id:publicKeyPem', '@value'));
-                       if (strstr($apcontact['pubkey'], 'RSA ')) {
+                       $apcontact['pubkey'] = trim(JsonLD::fetchElement($compacted['w3id:publicKey'], 'w3id:publicKeyPem', '@value') ?? '');
+                       if (strpos($apcontact['pubkey'], 'RSA ') !== false) {
                                $apcontact['pubkey'] = Crypto::rsaToPem($apcontact['pubkey']);
                        }
                }