forked from GNUsocial/gnu-social
[Posting] Fix wrong usage of DB::findBy
This commit is contained in:
parent
a6e41d3bd8
commit
b7b54b8a07
@ -129,7 +129,7 @@ END;
|
||||
DB::flush();
|
||||
if ($processed_attachments != []) {
|
||||
foreach ($processed_attachments as [$a, $fname]) {
|
||||
if (is_null(DB::findBy('gsactor_to_attachment', ['attachment_id' => $a->getId(), 'gsactor_id' => $actor_id]))) {
|
||||
if (empty(DB::findBy('gsactor_to_attachment', ['attachment_id' => $a->getId(), 'gsactor_id' => $actor_id]))) {
|
||||
DB::persist(GSActorToAttachment::create(['attachment_id' => $a->getId(), 'gsactor_id' => $actor_id]));
|
||||
}
|
||||
DB::persist(AttachmentToNote::create(['attachment_id' => $a->getId(), 'note_id' => $note->getId(), 'title' => $fname]));
|
||||
|
Loading…
Reference in New Issue
Block a user