Skip to content

Commit

Permalink
Update WhatsAppVideo.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Pier-d authored Oct 3, 2024
1 parent 34a172e commit 6c30712
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Messages/Channel/WhatsApp/WhatsAppVideo.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,8 @@ public function toArray(): array
{
$returnArray = $this->getBaseMessageUniversalOutputArray();
$returnArray['video'] = $this->videoObject->toArray();

if (!is_null($this->context)) {
$returnArray['context'] = $this->context;
}
$returnArray['context'] = $this->context ?? null;

return $returnArray;
}
}
}

1 comment on commit 6c30712

@Pier-d
Copy link
Contributor Author

@Pier-d Pier-d commented on 6c30712 Oct 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoiding Error Typed property Vonage\Messages\Channel\WhatsApp\WhatsAppVideo::$context must not be accessed before initialization

Please sign in to comment.