From: jitendrapurohit Date: Mon, 25 Apr 2016 11:30:36 +0000 (+0530) Subject: CRM-18035: Deleting file / attachment causes Undefined index: tag_id in CRM_Core_BAO_... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5fb2e4451e3b912cbf537226baa3b6c800bfe9f6;p=civicrm-core.git CRM-18035: Deleting file / attachment causes Undefined index: tag_id in CRM_Core_BAO_EntityTag::del() --- diff --git a/CRM/Core/BAO/EntityTag.php b/CRM/Core/BAO/EntityTag.php index 4ecdded214..10182decce 100644 --- a/CRM/Core/BAO/EntityTag.php +++ b/CRM/Core/BAO/EntityTag.php @@ -116,8 +116,10 @@ class CRM_Core_BAO_EntityTag extends CRM_Core_DAO_EntityTag { $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); + } } /**