Fix Notice: Undefined variable: valid in /src/Protocol/OStatus.php on line 526

This commit is contained in:
Michael 2020-11-18 13:47:29 +00:00
parent 503c582a31
commit a1dcbedc6f

View 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) {