]> git.mxchange.org Git - friendica.git/commitdiff
Check unparseURL parameter type in APContact::getByURL
authorHypolite Petovan <hypolite@mrpetovan.com>
Tue, 11 May 2021 01:52:26 +0000 (21:52 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Tue, 11 May 2021 01:52:26 +0000 (21:52 -0400)
- Address https://github.com/friendica/friendica/issues/10167#issuecomment-832421258

src/Model/APContact.php

index 863496dbb0f4883669f6004be411f34e6f83d50c..cc84df4a5484ad0ca4b928ca7fb852ff0ecf22dd 100644 (file)
@@ -235,7 +235,7 @@ class APContact
                unset($parts['path']);
 
                if (empty($apcontact['addr'])) {
-                       if (!empty($apcontact['nick'])) {
+                       if (!empty($apcontact['nick']) && is_array($parts)) {
                                $apcontact['addr'] = $apcontact['nick'] . '@' . str_replace('//', '', Network::unparseURL($parts));
                        } else {
                                $apcontact['addr'] = '';