prestaconcept / PrestaImageBundle

Allow to crop local and remote image before uploading them through a classic form.
MIT License
23 stars 19 forks source link

Base64ToImageTransformer do not save #83

Closed treeindark closed 2 years ago

treeindark commented 2 years ago

I use this bundle since 2years ?(je crois) I make update on my app, there a lots of updates, but after update an error still exist ????

"vendor/presta/image-bundle/Form/DataTransformer/Base64ToImageTransformer.php" 45 lines

reverseTransform don't save ! i make:

    public function reverseTransform($value): ?UploadedFile
    {
-        if (!isset($value['base64']) || !$value['base64']) {
+        if (!$value['base64']) {
            return null;
    }

Why ???

yann-eugone commented 2 years ago

So your issue is that the code enters the early return of the Base64ToImageTransformer::reverseTransform ?

You updated the code, and removed the !isset condition in that if to make it work ? It seems very weird, did you had the chance to see what's in $value at this moment ?