From 3ed338d49af887fd86358918c6582fd0f4bc6eb4 Mon Sep 17 00:00:00 2001 From: netkas Date: Thu, 3 Oct 2024 21:18:55 -0400 Subject: [PATCH] Corrected BackgroundTypeFill.php --- src/TgBotLib/Objects/BackgroundType/BackgroundTypeFill.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/TgBotLib/Objects/BackgroundType/BackgroundTypeFill.php b/src/TgBotLib/Objects/BackgroundType/BackgroundTypeFill.php index d7ac603..cd45e54 100644 --- a/src/TgBotLib/Objects/BackgroundType/BackgroundTypeFill.php +++ b/src/TgBotLib/Objects/BackgroundType/BackgroundTypeFill.php @@ -49,7 +49,10 @@ class BackgroundTypeFill extends BackgroundType implements ObjectTypeInterface */ public static function fromArray(?array $data): ?BackgroundTypeFill { - if() + if($data === null) + { + return null; + } $object = new self(); $object->type = type::FILL;