Skip to content
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

Fix recursion in crmInArray() #15092

Merged
merged 1 commit into from
Aug 21, 2019
Merged

Conversation

christianwach
Copy link
Member

Overview

See the issue on Lab.

Before

Recursion does not take place as expected.

After

Recursion takes place as expected.

Technical Details

There's a minor error in CRM_Utils_Array::crmInArray() where the method is called with crmInArray() instead of with self::crmInArray().

@civibot
Copy link

civibot bot commented Aug 21, 2019

(Standard links)

@civibot civibot bot added the master label Aug 21, 2019
@colemanw
Copy link
Member

This function appears to be only used in 2 places. Did you encounter this error at runtime? If the function has been broken this long, maybe we can just get rid of it.

@christianwach
Copy link
Member Author

@colemanw That decision is way above my pay grade - I just fixed it :)

@colemanw colemanw merged commit 8236a8b into civicrm:master Aug 21, 2019
@colemanw
Copy link
Member

Happy to merge the fix as it's obviously an improvement. But @christianwach I'm still curious to know if you encountered an error at runtime and if so what steps are needed to reproduce.

@christianwach christianwach deleted the lab-1196 branch August 21, 2019 16:23
@christianwach
Copy link
Member Author

@colemanw Nope, not at runtime -- was just poking around in CRM_Utils_Array and spotted it. I too couldn't find an example of passing a nested array to crmInArray but hey. Thanks for merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants