dacastro4 / laravel-gmail

Laravel wrapper for the Gmail API
MIT License
293 stars 135 forks source link

Call to a member function flatten() on null #282

Open rajvanshipradeep15 opened 3 months ago

rajvanshipradeep15 commented 3 months ago

PHP version 8.2.23

$messages = LaravelGmail::message()->take(2)->all( $pageToken = null );

While trying to read messages

foreach ($messages as $message) { $body = $message->getHtmlBody(); $subject = $message->getSubject(); }

when we call this function getHtmlBody it throws Error

Call to a member function flatten() on null