diff --git a/src/TgBotLib/Objects/PollAnswer.php b/src/TgBotLib/Objects/PollAnswer.php index 4deb526..474af23 100644 --- a/src/TgBotLib/Objects/PollAnswer.php +++ b/src/TgBotLib/Objects/PollAnswer.php @@ -51,7 +51,7 @@ { return [ 'poll_id' => $this->poll_id, - 'user' => ($this->user instanceof ObjectTypeInterface) ? $this->user->toArray() : null, + 'user' => $this->user?->toArray(), 'option_ids' => $this->option_ids, ]; }