Skip to content

Commit c4f353f

Browse files
authored
Update WhatsAppSticker.php (#510)
Avoiding Error Typed property Vonage\Messages\Channel\WhatsApp\WhatsAppSticker::$context must not be accessed before initialization
1 parent 7303140 commit c4f353f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Messages/Channel/WhatsApp/WhatsAppSticker.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,7 @@ public function toArray(): array
3838
{
3939
$returnArray = $this->getBaseMessageUniversalOutputArray();
4040
$returnArray['sticker'] = $this->getSticker()->toArray();
41-
42-
if (!is_null($this->context)) {
43-
$returnArray['context'] = $this->context;
44-
}
41+
$returnArray['context'] = $this->context ?? null;
4542

4643
return $returnArray;
4744
}

0 commit comments

Comments
 (0)