QA - Bug fix - filter_input_array - solution 2#13804
Conversation
ndossche
left a comment
There was a problem hiding this comment.
What a mess.
It seems like the code was kinda designed to be able to do FILTER_DEFAULT | FILTER_NULL_ON_FAILURE because their bits are exclusive, but indeed it doesn't work like that in practice and gives a warning due to the PHP_FILTER_ID_EXISTS.
The whole "flags" thing looks copy-pasted from elsewhere from the file, but indeed the meaning of this array is different.
And indeed, the code will always return NULL now.
The code change right now is correct as it will have the same behaviour as previously, just simpler.
I think this approach is okay.
|
@Girgias @kocsismate what do you think ? |
|
@nielsdos is it normal to take so long for something like this ? (sorry for being anxious) |
|
Sorry, I am very busy with another task which of course takes longer than expected.. but I will have another look as soon as possible. Anyway, I completely trust Niels' opinion, so I am ok with merging this as-is even though I'd have preferred to try to find a way to really fix the underlying issue). |
|
I'll merge this as-is since this is a correct change. Would be great to find a nice way to solve the fundamental problem here, but the change as-is is correct. |
|
Thanks a lot people |
relates to #13805
@kocsismate (because you are assigned as reviewer in the other pull request)
coverage: