From 5a1bbef4db9a2e34156558770c733ae1dfca9ecd Mon Sep 17 00:00:00 2001 From: "deb.monish" Date: Wed, 13 Apr 2016 01:52:36 +0530 Subject: [PATCH] CRM-18396: Type error when deduping contacts with custom file field --- CRM/Core/BAO/CustomField.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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; -- 2.25.1