From 0fedf2cc54350eb47052de68e94212dda46fe063 Mon Sep 17 00:00:00 2001 From: netkas Date: Fri, 4 Oct 2024 21:19:12 -0400 Subject: [PATCH] Updated GiveawayCreated --- src/TgBotLib/Objects/GiveawayCreated.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/TgBotLib/Objects/GiveawayCreated.php b/src/TgBotLib/Objects/GiveawayCreated.php index 7632213..000a6ac 100644 --- a/src/TgBotLib/Objects/GiveawayCreated.php +++ b/src/TgBotLib/Objects/GiveawayCreated.php @@ -31,8 +31,13 @@ class GiveawayCreated implements ObjectTypeInterface /** * @inheritDoc */ - public static function fromArray(array $data): ObjectTypeInterface + public static function fromArray(?array $data): ?GiveawayCreated { + if(!$data) + { + return null; + } + $object = new self(); $object->prize_star_count = $data['prize_star_count']; return $object;