-
-
Notifications
You must be signed in to change notification settings - Fork 827
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
[REF] Fix CRM_Utils_Array calls that return potentially incorrect value types #26899
Conversation
Thank you for contributing to CiviCRM! ❤️ We will need to test and review the PR. 👷 Introduction for new contributors
Quick links for reviewers |
816e315
to
dfe00e2
Compare
Looks good to me, based on code review. |
The Nitpick: As posted, it's one commit with many changes (100+ items over 50+ files) and with several subtle variations in detail (e.g. some items retain |
d0e7742
to
ab268a1
Compare
Ok thanks @totten those splits make sense. |
Yeah, it's a big one, so it's good for it to merge quickly. FWIW, I read through a bunch of these, and they seemed fine:
I didn't look closely at the others:
|
Overview
Resolves a lot of current & potential-future php deprecation notices by removing
CRM_Utils_Array
calls that were passing out an incorrect data type.Before
Lots of cases where it would have been trying to concatenate strings with NULL, or pass NULL into a function that only accepts a string, like
trim()
.After
Fixed
Technical Details
The way it was interacting with
CRM_Utils_String::munge
was especially problematic because in a scenario likeThe default return value of NULL could get passed into munge which would then pass it into
trim()
andpreg_replace()
causing two warnings, and then would fail to recognize that it was empty because it wasn't equal to$char
. I've cleaned that up too.