From bdadc7aca48164e8e6c7a4ce627f8b79edb2b251 Mon Sep 17 00:00:00 2001 From: kurund Date: Fri, 23 Aug 2013 01:48:30 +0530 Subject: [PATCH] CRM-13209, fixes to remove required if file exists ---------------------------------------- * CRM-13209: Mandatory custom fields, on edit, always require a new upload (regression) http://issues.civicrm.org/jira/browse/CRM-13209 --- CRM/Core/BAO/CustomGroup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Core/BAO/CustomGroup.php b/CRM/Core/BAO/CustomGroup.php index 295255a04d..83636eb6be 100644 --- a/CRM/Core/BAO/CustomGroup.php +++ b/CRM/Core/BAO/CustomGroup.php @@ -1475,7 +1475,7 @@ ORDER BY civicrm_custom_group.weight, $required = CRM_Utils_Array::value('is_required', $field); //fix for CRM-1620 if ($field['data_type'] == 'File') { - if (isset($field['element_value']['data'])) { + if (!empty($field['element_value']['data'])) { $required = 0; } } -- 2.25.1