Skip to content

Commit

Permalink
Merge pull request #8228 from jitendrapurohit/CRM-18035
Browse files Browse the repository at this point in the history
CRM-18035: Deleting file / attachment causes Undefined index: tag_id …
  • Loading branch information
monishdeb committed Apr 26, 2016
2 parents 739afc5 + 5fb2e44 commit d8a0b05
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CRM/Core/BAO/EntityTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,10 @@ public static function del(&$params) {
$entityTag->delete();

//invoke post hook on entityTag
$object = array(0 => array(0 => $params['entity_id']), 1 => $params['entity_table']);
CRM_Utils_Hook::post('delete', 'EntityTag', $params['tag_id'], $object);
if (!empty($params['tag_id'])) {
$object = array(0 => array(0 => $params['entity_id']), 1 => $params['entity_table']);
CRM_Utils_Hook::post('delete', 'EntityTag', $params['tag_id'], $object);
}
}

/**
Expand Down

0 comments on commit d8a0b05

Please sign in to comment.