fixed spacing and indentation
authorRandy Tobias <rtobias@servnettech.com>
Tue, 15 Aug 2017 19:58:15 +0000 (15:58 -0400)
committerRandy Tobias <rtobias@servnettech.com>
Wed, 16 Aug 2017 17:15:32 +0000 (13:15 -0400)
CRM/Core/BAO/Log.php

index 98765340101bc41a6ad097c31e03dfdf14674777..9403c1b5bc4c35c6dd32179ed65c8f23a9a45bf3 100644 (file)
@@ -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,