Check $profile variable in mod/match
authorHypolite Petovan <hypolite@mrpetovan.com>
Thu, 7 Mar 2019 23:42:49 +0000 (18:42 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Thu, 7 Mar 2019 23:42:49 +0000 (18:42 -0500)
- Addresses https://github.com/friendica/friendica/issues/6337#issuecomment-470733015

mod/match.php

index 57e0522..2b3c7ca 100644 (file)
@@ -75,7 +75,7 @@ function match_content(App $a)
                        $profile = $msearch->results[$i];
 
                        // Already known contact
-                       if (Contact::getIdForURL($profile->url, local_user(), true)) {
+                       if (!$profile || Contact::getIdForURL($profile->url, local_user(), true)) {
                                continue;
                        }