Unverified Commit bf6eb37a authored by colemanw's avatar colemanw Committed by GitHub

Merge pull request #13486 from deb1990/core-670-fix-activity-tags

(WIP) #670 - Fix Saving of Case Activity tags
parents d0fe005c 63b7aefc
......@@ -1066,9 +1066,8 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
if (!is_array($params['tag'])) {
$params['tag'] = explode(',', $params['tag']);
}
foreach ($params['tag'] as $tag) {
$tagParams[$tag] = 1;
}
$tagParams = array_fill_keys($params['tag'], 1);
}
// Save static tags.
......
......@@ -543,9 +543,11 @@ class CRM_Case_Form_Activity extends CRM_Activity_Form_Activity {
// add tags if exists
$tagParams = array();
if (!empty($params['tag'])) {
foreach ($params['tag'] as $tag) {
$tagParams[$tag] = 1;
if (!is_array($params['tag'])) {
$params['tag'] = explode(',', $params['tag']);
}
$tagParams = array_fill_keys($params['tag'], 1);
}
//save static tags
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment