]> git.mxchange.org Git - friendica.git/commitdiff
Fix Notice: Undefined variable: valid in /src/Protocol/OStatus.php on line 526
authorMichael <heluecht@pirati.ca>
Wed, 18 Nov 2020 13:47:29 +0000 (13:47 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 18 Nov 2020 13:47:29 +0000 (13:47 +0000)
src/Protocol/OStatus.php

index b8724acc7ff78192007e946f8243c94ba3d6401f..a21b2a69470877c9aa1bac335239ebbd1a116031 100644 (file)
@@ -521,6 +521,12 @@ class OStatus
                                                        Logger::log("Item with uri ".self::$itemlist[0]['uri']." will be imported since the thread contains posts or shares.", Logger::DEBUG);
                                                }
                                        }
+                               } else {
+                                       // But we will only import complete threads
+                                       $valid = Item::exists(['uid' => $importer['uid'], 'uri' => self::$itemlist[0]['thr-parent']]);
+                                       if ($valid) {
+                                               Logger::info('Item is valid', ['uri' => self::$itemlist[0]["uri"], 'thr-parent' => self::$itemlist[0]['thr-parent'], 'user' => $importer["uid"]]);
+                                       }
                                }
 
                                if ($valid) {