diff --git a/app/src/Lib/Match/MatchService.php b/app/src/Lib/Match/MatchService.php index ec6c1ad17..95e141825 100644 --- a/app/src/Lib/Match/MatchService.php +++ b/app/src/Lib/Match/MatchService.php @@ -140,8 +140,8 @@ public function diffCandidates(array $original, array $candidates) { // out in PHP code. Also, RuleAttributes can affect how matching // works, and right now we don't look at those at all. - $origvalue = $original[$attr]; - $value = $c[$attr]; + $origvalue = !empty($original[$attr]) ? $original[$attr] : ''; + $value = !empty($c[$attr]) ? $c[$attr] : ''; if($attrConfig[$attr]->alphanumeric) { $origvalue = preg_replace('/[^A-Za-z0-9]/', '', $origvalue); diff --git a/app/src/Lib/Util/ArrayUtil.php b/app/src/Lib/Util/ArrayUtil.php deleted file mode 100644 index fde2cc5fc..000000000 --- a/app/src/Lib/Util/ArrayUtil.php +++ /dev/null @@ -1,44 +0,0 @@ - $val) { if($key == $fieldNames[$i]) { - $canAttr[$i][1][] = $val; + $id = $c['id']; + $diff = in_array($key,$vv_candidate_diff[$id]) ? 1 : 0; + $canAttr[$i][1][] = [$val, $id, $diff]; } } } - - // Test for content and equality between the row's attribute values and - // set the third "match?" column to true (1) if non-empty equality found - $canAttr[$i][2] = !empty($canAttr[$i][1][0]) && count(ArrayUtil::array_iunique($canAttr[$i][1])) === 1 ? 1 : 0; } // Move request_time and resolution_time to the bottom @@ -160,6 +158,7 @@