[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:
Eliseu Amaro 2021-11-29 14:38:06 +00:00 committed by Diogo Peralta Cordeiro
parent 98568b6f53
commit db33800ade
Signed by: diogo
GPG Key ID: 18D2D35001FBFAB0
1 changed files with 1 additions and 1 deletions

View File

@ -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'];
}