Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If messages are null in all() method error generated #244

Open
NaagarjunaaRavikkumar opened this issue Jan 10, 2023 · 1 comment
Open

If messages are null in all() method error generated #244

NaagarjunaaRavikkumar opened this issue Jan 10, 2023 · 1 comment

Comments

@NaagarjunaaRavikkumar
Copy link

Hi team,
https://github.com/dacastro4/laravel-gmail/blob/master/src/Services/Message.php#:~:text=%24messages%20%3D%20%24response%2D%3EgetMessages()%3B

if the messages are null due to added filters then it is returning error. we need to add a check for messages. kindly check the image for error.

image

Thanks

@joneriktalvio
Copy link

Had the same issue, changed the code in Message.php like this:

if ( is_countable($messages) && count($messages) > 0){
	$mails = $this->batchRequest($messages);	
}else{
	$mails = [];
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants