FriendsOfCake / cakephp-upload

CakePHP: Handle file uploading sans ridiculous automagic
https://cakephp-upload.readthedocs.io/
MIT License
551 stars 255 forks source link

Fix beforeMarshall if file uploads are array #588

Closed albertcansado closed 1 year ago

albertcansado commented 2 years ago

Fix error "Call to a member function getError() on array" when uploaded file is an array.

codecov[bot] commented 2 years ago

Codecov Report

Merging #588 (f412266) into master (878cba2) will decrease coverage by 0.17%. The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master     #588      +/-   ##
============================================
- Coverage     95.68%   95.50%   -0.18%     
- Complexity      108      109       +1     
============================================
  Files            11       11              
  Lines           278      267      -11     
============================================
- Hits            266      255      -11     
  Misses           12       12              
Impacted Files Coverage Δ
src/Model/Behavior/UploadBehavior.php 94.56% <100.00%> (-0.18%) :arrow_down:
src/File/Writer/DefaultWriter.php 100.00% <0.00%> (ø)
src/File/Path/DefaultProcessor.php 100.00% <0.00%> (ø)
src/File/Path/Basepath/DefaultTrait.php 100.00% <0.00%> (ø)
src/File/Transformer/DefaultTransformer.php 100.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

davidyell commented 2 years ago

A few small bits to tidy up.

albertcansado commented 2 years ago

Done!

davidyell commented 2 years ago

You have some build failures still to address, looking at the pipeline

ravage84 commented 1 year ago

@albertcansado the code needs to have PHP 7.2 compat as it needs to keep CakePHP 4.x before 4.4 compatibility.

https://github.com/FriendsOfCake/cakephp-upload/blob/878cba2420e055d821eebeb50659141e3523e22d/composer.json#L19

@TerryKern's changes take care of that.