]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Mail.php
Merge pull request #10860 from nupplaphil/feat/depository_profilefield
[friendica.git] / src / Model / Mail.php
index 7eaeb09b5e6ba85b6866a84bd8f56f0c13869f37..75515c5df53c8166e5d0240ea570a4120f6525cf 100644 (file)
@@ -74,9 +74,7 @@ class Mail
                        return false;
                }
 
-               if ($msg['reply']) {
-                       $reply = DBA::selectFirst('mail', ['uri', 'uri-id'], ['parent-uri' => $msg['parent-uri'], 'reply' => false]);
-
+               if ($msg['reply'] && DBA::isResult($reply = DBA::selectFirst('mail', ['uri', 'uri-id'], ['parent-uri' => $msg['parent-uri'], 'reply' => false]))) {
                        $msg['thr-parent']    = $reply['uri'];
                        $msg['thr-parent-id'] = $reply['uri-id'];
                } else {