-
-
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] CRM/Activity - Refactor unnecessary uses of CRM_Utils_Array::value #27825
Conversation
🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷 Introduction for new contributors...
Quick links for reviewers...
|
$actionLinks = $this->actionLinks(CRM_Utils_Array::value('activity_type_id', $row), | ||
CRM_Utils_Array::value('source_record_id', $row), | ||
$actionLinks = $this->actionLinks($row['activity_type_id'], | ||
$row['source_record_id'] ?? NULL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be two ??
expressions here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I think there could be zero. The $row
variable comes from CRM_Activity_BAO_Activity::getActivities()
which is hard-coded to always return both 'activity_type_id'
and 'source_record_id'
keys, so they will never be undefined.
d0e54c8
to
7f04a57
Compare
Based on reading the code, this looks merge-ready with or without the changes discussed for |
Agreed. Future improvements are always possible but not a blocker. |
Overview
Part of ongoing cleanup work to deprecate/remove php5-era function
CRM_Utils_Array::value
.