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;