Fix beforeMarshall if file uploads are array
Fix error "Call to a member function getError() on array" when uploaded file is an array.
Codecov Report
Merging #588 (f412266) into master (878cba2) will decrease coverage by
0.17%. The diff coverage is100.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.
A few small bits to tidy up.
Done!
You have some build failures still to address, looking at the pipeline
@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.