CRM-19947 adjust url condition
authorBrian Shaughnessy <brian@lcdservices.biz>
Thu, 2 Feb 2017 14:28:33 +0000 (09:28 -0500)
committerBrian Shaughnessy <brian@lcdservices.biz>
Thu, 2 Feb 2017 14:28:33 +0000 (09:28 -0500)
CRM/Profile/Form.php

index e513affbaa72be97cf2a1d10aee3167f3f6bdedd..d6abda6e3d595cc9ddb84d4b9ea8ac271eda396b 100644 (file)
@@ -500,7 +500,11 @@ class CRM_Profile_Form extends CRM_Core_Form {
             ) {
               $entityId = $this->_activityId;
             }
-            $url = CRM_Core_BAO_CustomField::getFileURL($entityId, $key, $value);
+
+            $url = '';
+            if (isset($value)) {
+              $url = CRM_Core_BAO_CustomField::getFileURL($entityId, $key, $value);
+            }
 
             if ($url) {
               $customFiles[$name]['displayURL'] = ts("Attached File") . ": {$url['file_url']}";