[PLUGINS][Embed] Embed references a table that does not exist. It seems to mean `attachment_embed`, rather than `link_to_attachment`

This commit is contained in:
Hugo Sales 2021-09-05 20:42:40 +01:00
parent cd89106fc0
commit bdde047dfa
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
1 changed files with 3 additions and 3 deletions

View File

@ -304,9 +304,9 @@ class Embed extends Plugin
}
// If an attachment already exist, do not create an Embed for it. Some other plugin must have done things
$link_to_attachment = DB::find('link_to_attachment', ['link_id' => $link->getId()]);
if (!is_null($link_to_attachment)) {
$attachment_id = $link_to_attachment->getAttachmentId();
$attachment_to_link = DB::find('attachment_to_link', ['link_id' => $link->getId()]);
if (!is_null($attachment_to_link)) {
$attachment_id = $attachment_to_link->getAttachmentId();
try {
$attachment = DB::findOneBy('attachment', ['id' => $attachment_id]);
$attachment->livesIncrementAndGet();