-
-
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
CRM-21068 - getLastModified fails more gracefully now. #10863
CRM-21068 - getLastModified fails more gracefully now. #10863
Conversation
Can one of the admins verify this patch? |
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.
@rtobias81 As discussed on chat.civicrm.org :-)
CRM/Core/BAO/Log.php
Outdated
@@ -42,18 +42,22 @@ class CRM_Core_BAO_Log extends CRM_Core_DAO_Log { | |||
* @param string $table | |||
* | |||
* @return array|null | |||
* | |||
* This just has a couple of small changes suggested by Eileen to make this function fail more gracefully. |
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.
This comment doesn't have much meaning once this change is committed and should probably be removed. It's more of a "commit message" comment
if ($log->find(TRUE)) { | ||
list($displayName, $contactImage) = CRM_Contact_BAO_Contact::getDisplayAndImage($log->modified_id); | ||
if ($log->modified_id) { |
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.
For me, I might want a short comment explaining why we check modified_id
jenkins, ok to test |
@rtobias81 do you know how to deal with the style warnings? We use drupal whitespace conventions |
Not really. Or at least not if it is anything other than just going back and fixing the spacing issues. It helps when you can see (I didn't realize I didn't have the right indenting for the function declaration). That said, I saw it complaining about stuff in lines 71-90something, which I find odd as I only replaces lines 48-69. Can I just commit my fixed function declaration spacing and rerun the test to see if that fixed other issues? |
Yep, if you fix the spaces & do git commit --amend & then git push -f to keep it clean jenkins will try again |
e987180
to
c1d6875
Compare
@rtobias81 this looks good. I want to push you a little more for a couple of bits of tidy up
When you push to your branch on github you will need to use -f as you are rewriting history (you didn't know the past could be changed so easily!) |
add to whitelist |
c11ef9a
to
e89461f
Compare
e89461f
to
4c7ef0e
Compare
Overview
This helps resolve some errors when trying to view contacts.
Before
Without this change, there were cases were some contacts were throwing Not Of Type Integer errors in the Contact Summary view (from getDisplayAndImage).
After
This change makes the getLastModified fail more gracefully, so it doesn't display an error if something is missing for a contact when getDisplayAndImage is called from the Summary View.
Technical Details
Comments