diff --git a/src/TelegramContactDriver.php b/src/TelegramContactDriver.php index c39c073..5f79d6f 100644 --- a/src/TelegramContactDriver.php +++ b/src/TelegramContactDriver.php @@ -48,11 +48,11 @@ public function loadMessages() { $message = new IncomingMessage(Contact::PATTERN, $this->event->get('from')['id'], $this->event->get('chat')['id'], $this->event); $message->setContact(new Contact( - $this->event->get('contact')['phone_number']??"", - $this->event->get('contact')['first_name']??"", - $this->event->get('contact')['last_name']??"", + $this->event->get('contact')['phone_number'] ?? '', + $this->event->get('contact')['first_name'] ?? '', + $this->event->get('contact')['last_name'] ?? '', $this->event->get('contact')['user_id'], - $this->event->get('contact')['vcard']??"" + $this->event->get('contact')['vcard'] ?? '' )); $this->messages = [$message];