From: deb.monish Date: Tue, 12 Apr 2016 20:22:36 +0000 (+0530) Subject: CRM-18396: Type error when deduping contacts with custom file field X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5a1bbef4db9a2e34156558770c733ae1dfca9ecd;p=civicrm-core.git CRM-18396: Type error when deduping contacts with custom file field --- diff --git a/CRM/Core/BAO/CustomField.php b/CRM/Core/BAO/CustomField.php index 50cf7d067e..9634e840b4 100644 --- a/CRM/Core/BAO/CustomField.php +++ b/CRM/Core/BAO/CustomField.php @@ -1230,8 +1230,14 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField { } else { // In other contexts show a paperclip icon - $icons = CRM_Core_BAO_File::paperIconAttachment('*', $value); - $display = $icons[$value]; + if (CRM_Utils_Rule::integer($value)) { + $icons = CRM_Core_BAO_File::paperIconAttachment('*', $value); + $display = $icons[$value]; + } + else { + //CRM-18396, if filename is passed instead + $display = $value; + } } } break;