TelegramBot / Api

Native PHP Wrapper for Telegram BOT API
MIT License
1.09k stars 323 forks source link

error Undefined property: TelegramBot\Api\Types\Contact::$vcard when calling method Contact.toJson() #394

Closed zserg84 closed 1 year ago

zserg84 commented 1 year ago

error when calling method Contact.toJson() due to map param is vcard and setter is setVCard()

bernard-ng commented 1 year ago

@BoShurik could you have a look here too ?

BoShurik commented 1 year ago

I think from telegram we got vcard property, so we need to rename setter to setVcard instead of renaming param

BoShurik commented 1 year ago

PHP methods are case insensitive so there is no problem here (see https://3v4l.org/Mkr2X)