Skip to content

Conversation

@chrootchad
Copy link
Contributor

Handle null attachment filenames when calling extension(). Fixes #132

@stevebauman stevebauman merged commit 36d6a63 into DirectoryTree:master Nov 10, 2025
8 checks passed
@stevebauman
Copy link
Member

Thanks! 🙏

@chrootchad
Copy link
Contributor Author

chrootchad commented Nov 10, 2025

No worries, thanks yet again for the great project.
Was going to go with the early return, but wasn't sure if you wanted this part to still get a shot at retrieving the extension from the content type 👍

        if ($ext = (MimeTypes::getDefault()->getExtensions($this->contentType)[0] ?? null)) {
            return $ext;
        }

@stevebauman
Copy link
Member

stevebauman commented Nov 10, 2025

Oh I'm sorry @chrootchad! That's my mistake 🙈. I'll revert my change and put back in what you had. What you had is correct.

@stevebauman
Copy link
Member

@chrootchad I've released v1.18.6 with this change. It's back to the way you had it 👍

@chrootchad chrootchad deleted the bug-132 branch November 10, 2025 23:37
@chrootchad chrootchad restored the bug-132 branch November 10, 2025 23:38
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.

pathinfo(): Passing null to parameter #1 ($path) of type string is deprecated

2 participants