Skip to content

Fix attachment content disposition return type - #197

Merged
stevebauman merged 1 commit into
masterfrom
fix/nullable-attachment-content-disposition
Nov 4, 2026
Merged

stevebauman merged 1 commit into
masterfrom
fix/nullable-attachment-content-disposition

Conversation

@stevebauman

Copy link
Copy Markdown
Member

Attachments fetched from an IMAP body structure can have a filename without a content disposition. In that case, calling contentDisposition() throws a TypeError because the method declares a string return type even though the constructor accepts null.

This changes the return type to ?string so attachments without a disposition return null.

Closes #195.

Validation: all 387 unit tests pass on PHP 8.4, and Pint passes for the changed files.

@stevebauman
stevebauman merged commit 19618d4 into master Nov 4, 2026
13 checks passed
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.

Fix return type acc. to the constructor

1 participant