]> git.mxchange.org Git - friendica.git/commitdiff
Fix Fatal error: Uncaught TypeError: Argument 1 passed to Friendica\Model\Contact...
authorMichael <heluecht@pirati.ca>
Tue, 20 Oct 2020 15:15:33 +0000 (15:15 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 20 Oct 2020 15:15:33 +0000 (15:15 +0000)
src/Factory/Notification/Introduction.php

index efee886f91cd8ce94d5d9c92ad2a19c1dc6dbd5b..8097da47120bc0e142d0a458a08bc24a4e17d910 100644 (file)
@@ -115,10 +115,17 @@ class Introduction extends BaseFactory
                        );
 
                        while ($notification = $this->dba->fetch($stmtNotifications)) {
-                               // There are two kind of introduction. Contacts suggested by other contacts and normal connection requests.
+                               if (empty($notification['url'])) {
+                                       continue;
+                               }
+
+                       // There are two kind of introduction. Contacts suggested by other contacts and normal connection requests.
                                // We have to distinguish between these two because they use different data.
                                // Contact suggestions
                                if ($notification['fid'] ?? '') {
+                                       if (empty($notification['furl'])) {
+                                               continue;
+                                       }
                                        $return_addr = bin2hex($this->nick . '@' .
                                                               $this->baseUrl->getHostName() .
                                                               (($this->baseUrl->getURLPath()) ? '/' . $this->baseUrl->getURLPath() : ''));
@@ -143,10 +150,6 @@ class Introduction extends BaseFactory
 
                                        // Normal connection requests
                                } else {
-                                       if (empty($notification['url'])) {
-                                               continue;
-                                       }
-
                                        // Don't show these data until you are connected. Diaspora is doing the same.
                                        if ($notification['network'] === Protocol::DIASPORA) {
                                                $notification['location'] = "";