forked from GNUsocial/gnu-social
[PLUGINS][Reply] Array key 'reply_to' checked if it exists.
Plugin\Reply\Entity\NoteReply::getReplyToNote lacked a check to make sure the 'reply_to' key existed within the array resulting from the query.
This commit is contained in:
parent
98568b6f53
commit
db33800ade
@ -95,7 +95,7 @@ class NoteReply extends Entity
|
||||
$result = DB::dql('select nr.reply_to from note_reply nr '
|
||||
. 'where nr.note_id = :note_id', ['note_id' => $note->getId()], );
|
||||
|
||||
if (!empty($result)) {
|
||||
if (!\is_null($result) && \array_key_exists('reply_to', $result)) {
|
||||
return $result['reply_to'];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user