Index: modules/project_issue/comment.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project_issue/comment.inc,v
retrieving revision 1.117
diff -u -p -r1.117 comment.inc
--- modules/project_issue/comment.inc	23 Jan 2008 19:15:53 -0000	1.117
+++ modules/project_issue/comment.inc	25 Jan 2008 08:49:44 -0000
@@ -256,22 +256,16 @@ function project_issue_comment_view(&$no
  *  )
  */
 function project_issue_comment_changes($node, $old_data, $new_data, $field_labels = array()) {
-  // Populate output array with available names and labels.
   $changes = array();
   foreach ($field_labels as $property => $name) {
-    $changes[$property] = array('label' => $name);
-  }
-
-  // Create an array that contains the name of all properties in both $old_data and $new_data
-  $all_properties = array();
-  if (!empty($old_data)){
-    $all_properties = array_keys(get_object_vars($old_data));
-  }
-  if (!empty($new_data)) {
-    $all_properties = array_merge($all_properties, array_keys(get_object_vars($new_data)));
-  }
-  $all_properties = array_unique($all_properties);
-  foreach ($all_properties as $property) {
+    if ($property == 'rid' && empty($old_data->rid) && empty($new_data->rid)) {
+      // Special case for version -- if both are empty, leave it out entirely,
+      // since maybe this project doesn't have (and/or disabled) any releases.
+      continue;
+    }
+    if (isset($old_data->$property) || isset($new_data->$property)) {
+      $changes[$property] = array('label' => $name);
+    }
     if (isset($old_data->$property) && isset($new_data->$property)) {
       if ($old_data->$property != $new_data->$property) {
         $changes[$property]['old'] = $old_data->$property;
@@ -280,10 +274,8 @@ function project_issue_comment_changes($
     }
     elseif (isset($old_data->$property)) {
       $changes[$property]['old'] = $old_data->$property;
-      $changes[$property]['new'] = '';
     }
     else {
-      $changes[$property]['old'] = '';
       $changes[$property]['new'] = $new_data->$property;
     }
   }
