-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[5.3] Fixed the validator bug in hydrateFiles when removing the files array #15663
Conversation
If this value is an instance of the Array, failed when remove files from the data
tests for #15660 |
The test you added is currently passing without the changes you are introducing, can you please describe what are you trying to fix? |
@themsaid Upload the files array , hydrateFiles can't remove it from data array |
@chengguoqiang can you please add a failing test? |
We also need a much better description of what this is attempting to solve / fix / do before merging. |
@themsaid I added a failing test, please check, thank you. |
@taylorotwell the description was modified, would you please check the description for me |
Well you just pointed out a bug, but the fix isn't actually complete. The validator works fine with this bug except for the part of separating data from files for array file uploads, means that now To ensure everything is working, you may add these tests:
|
@themsaid improvement |
I'm sorry but your version of These simple tests should pass:
If you try it |
I update the each() method and merge the files array to the $data array inside the method before starting the iteration. these simple tests what you given run fail: |
|
||
if ($value != '__missing__') { | ||
if (! is_null($value)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason for this change? null
is a value we still want to get.
In the
so that it looks into the files array as well, if you have this the tests will pass. |
the tests pass, thank you very match |
Please rebase and squash to one commtit. |
fixed the bug of the method hydrateFiles when remove the files array.