From 4c7ef0e6e55217179d5a3d4e6971caeddd32f03f Mon Sep 17 00:00:00 2001 From: Randy Tobias Date: Tue, 15 Aug 2017 15:58:15 -0400 Subject: [PATCH] fixed spacing and indentation --- CRM/Core/BAO/Log.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CRM/Core/BAO/Log.php b/CRM/Core/BAO/Log.php index 9876534010..9403c1b5bc 100644 --- a/CRM/Core/BAO/Log.php +++ b/CRM/Core/BAO/Log.php @@ -42,6 +42,7 @@ class CRM_Core_BAO_Log extends CRM_Core_DAO_Log { * @param string $table * * @return array|null + * */ public static function &lastModified($id, $table = 'civicrm_contact') { @@ -51,9 +52,11 @@ class CRM_Core_BAO_Log extends CRM_Core_DAO_Log { $log->entity_id = $id; $log->orderBy('modified_date desc'); $log->limit(1); - $result = NULL; + $displayName = $result = $contactImage = NULL; if ($log->find(TRUE)) { - list($displayName, $contactImage) = CRM_Contact_BAO_Contact::getDisplayAndImage($log->modified_id); + if ($log->modified_id) { + list($displayName, $contactImage) = CRM_Contact_BAO_Contact::getDisplayAndImage($log->modified_id); + } $result = array( 'id' => $log->modified_id, 'name' => $displayName, -- 2.25.1