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

[9.x] Fix missing return #43023

Merged
merged 2 commits into from
Jul 1, 2022
Merged

[9.x] Fix missing return #43023

merged 2 commits into from
Jul 1, 2022

Conversation

wfeller
Copy link
Contributor

@wfeller wfeller commented Jun 30, 2022

No description provided.

@driesvints driesvints requested a review from timacdonald June 30, 2022 15:21
@GrahamCampbell GrahamCampbell changed the title Fix missing return [9.x] Fix missing return Jun 30, 2022
@GrahamCampbell
Copy link
Member

Thanks for the PR. What exactly does this fix, please?

@wfeller
Copy link
Contributor Author

wfeller commented Jun 30, 2022

use \Illuminate\Mail\Attachment;
use \Illuminate\Notifications\Messages\MailMessage;

$message = new MailMessage;

// this should return the message but returns null, which prevents from chaining other message methods
$message->attach(
    Attachment::fromStorageDisk('local', 'path.pdf')
);

@timacdonald
Copy link
Member

I've verified this is indeed a fix and added a test for good measure that fails without this change.

Thanks for the PR @wfeller.

@taylorotwell taylorotwell merged commit 3574840 into laravel:9.x Jul 1, 2022
@wfeller wfeller deleted the patch-1 branch July 1, 2022 21:00
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

Successfully merging this pull request may close these issues.

4 participants