// In other contexts show a paperclip icon
if (CRM_Utils_Rule::integer($value)) {
$icons = CRM_Core_BAO_File::paperIconAttachment('*', $value);
- $display = $icons[$value] . civicrm_api3('File', 'getvalue', ['return' => "description", 'id' => $value]);
+
+ $file_description = '';
+ try {
+ $file_description = civicrm_api3('File', 'getvalue', ['return' => "description", 'id' => $value]);
+ }
+ catch (CiviCRM_API3_Exception $dontcare) {
+ // don't care
+ }
+
+ $display = "{$icons[$value]}{$file_description}";
}
else {
//CRM-18396, if filename is passed instead