-
-
Notifications
You must be signed in to change notification settings - Fork 825
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 strstr deprecation in CustomDataByType class #25230
[REF] Fix strstr deprecation in CustomDataByType class #25230
Conversation
(Standard links)
|
I don't know what the circumstance is but does this actually work? Won't you have the same problem with trim() on the next line? Maybe up at line 36 would be better? |
Does it even make sense that a request variable would contain CRM_Core_DAO::VALUE_SEPARATOR? Or that it could ever be an array when it specifies String in the retrieve()? I'm wondering if these lines are left over from some older version? |
That said, I'm equally happy to move to line 36, which also ensures we're passing a string to
It's a very valid question. I've been doing some playing and can't find a case where So I guess the question is how comfortable you are that this could be removed? Another option would be to add a call to |
Good thinking. I like the deprecation notice.
so is really unlikely to be an array. So I'm pretty confident that deprecating is valid. |
fe8c692
to
ad3247e
Compare
Looks like I merged an earlier one too quickly without seeing the same thing although it's slightly different since the param can come from anywhere, but has the same trim() issue on the next line. The downside of PRs that have 18 disconnected things in them... |
Overview
Fix strstr deprecation in CustomDataByType class.
Before
The following error could be logged:
After
Ensure value passed to
strstr
is an empty string rather than null, avoiding deprecated functionality.