-
-
Notifications
You must be signed in to change notification settings - Fork 828
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
Flatten fix #13176
Flatten fix #13176
Conversation
(Standard links)
|
test this please |
@aydun these are the places that call that function. I think it's logical that tokens should process empty tokens too and I can't see why any of the DAO / handler places would be empty. I am a bit less sure about the dedupe call. I feel like the change is likely OK but could have unexpected consequences so I think it makes sense to add an array_filter call in the dedupe path My suggestion is always to do any wrangling as close to where it is used as possible & in this case the array is passed through to a function that is only called from one place - so I would go with
|
let's try again - test fails are
|
test this please |
Thanks @eileenmcnaughton I've added that change to CRM/Dedupe/Finder.php |
test this please |
test this please |
@eileenmcnaughton Are you ok to merge this now? |
Overview
Bug fix for
CRM_Utils_Array::flatten()
extracted from #12012 Flatten should restructure the array and return all original keys, not filter based on value.Includes a test
Before
Keys with empty values are not in the flattened array
After
Keys with empty values are included in the flattened array
Comments
There are only a few uses of this function in the codebase. So far as I can see, none of them assume empty values will be filtered out.