Closed eleven59 closed 2 weeks ago
Hello there! Thanks for opening your first issue on this repo!
Just a heads-up: Here at Backpack we use GitHub Issues only for tracking bugs. Talk about new features is also acceptable. This helps a lot in keeping our focus on improving Backpack. If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below). If you're not sure where it fits, it's ok, a community member will probably reply to help you with that.
Backpack communication channels:
backpack-for-laravel
tag;Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome awesome community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch.
Thank you!
-- Justin Case The Backpack Robot
Bug report
What I did
Added an image field in a repeatable field, and used withFiles for storage. I encounter a bug when I try to update an image if that image was previously empty.
Steps to reproduce:
This results in the following error:
League\Flysystem\Filesystem::delete(): Argument #1 ($location) must be of type string, null given, called in vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php on line 513
The issue, I think, is that
uploadRepeatableFiles
, invendor/Backpack/CRUD/app/Library/Uploaders/SingleBase64Image.php
does not check whether an image actually exists. I think this happens on line 56, which should be changed:Now:
Should be:
What I expected to happen
Image uploaded to correct folder, no errors thrown.
What happened
Error message, failed to delete non-existent old image
What I've already tried to fix it
deleteWhenEntryIsDeleted
but as expected this has no effect on this behaviorNot much else to try, am I wrong?
Is it a bug in the latest version of Backpack?
After I run
composer update backpack/crud
the bug... is it still there? Yes.Backpack, Laravel, PHP, DB version
When I run
php artisan backpack:version
the output is: