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

[Bug]: League\Flysystem\Filesystem::directoryExists(): Argument #1 ($location) must be of type string, null given #79

Closed
Jacobtims opened this issue Sep 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Jacobtims
Copy link
Contributor

Jacobtims commented Sep 11, 2024

What happened?

When old email logs get pruned and they don't have any attachments to delete, I get the following error:

TypeError
League\Flysystem\Filesystem::directoryExists(): Argument #1 ($location) must be of type string, null given, called in /vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php on line 225

The error occurs in the Email model, because the $folderPath variable is null:

/vendor/rickdbcn/filament-email/src/Models/Email.php in RickDBCN\FilamentEmail\Models\Email::RickDBCN\FilamentEmail\Models\{closure} at line 94

How to reproduce the bug

  1. Enable the email log prune
  2. Ensure that an email log without attachments can be pruned
  3. When the email log is deleted, an error appears in the logs

Package Version

1.6.1

PHP Version

8.2.23

Laravel Version

10.48.20

Which operating systems does with happen with?

macOS, Linux

Notes

No response

@Jacobtims Jacobtims added the bug Something isn't working label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant