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

Add Check before deleting a profile photo #959

Merged
merged 3 commits into from
Jan 19, 2022

Conversation

Jubeki
Copy link
Contributor

@Jubeki Jubeki commented Jan 19, 2022

Laravel 9 uses Filesystem 3.
For deleting a file you must provide a string. But if no profile photo is set the profile_photo_path can be null.

This PR adds a Check before deleting the profile photo.

FilesystemAdapter Interface which requires the usage of a string:
https://github.com/thephpleague/flysystem/blob/912ba3e5595280999b9fa99a3c20c5ecb7de6870/src/FilesystemAdapter.php#L53

@taylorotwell taylorotwell merged commit fec0bae into laravel:2.x Jan 19, 2022
@Jubeki Jubeki deleted the only-delete-existing-profile-photos branch January 19, 2022 15:47
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.

2 participants