0001503: Request - fee account included in bank account table
[fa-stable.git] / includes / db / crm_contacts_db.inc
index 3f34b70e7d75ba2f4ecd5b3bf8aeee62da07b878..3b47790fb313b851fb289d9cf16469157eecc750 100644 (file)
@@ -150,6 +150,9 @@ function update_person_contacts($id, $cat_ids, $entity_id=null)
 
        $ret = db_query($sql, "Can't delete person contacts");
 
+       foreach($cat_ids as $n => $cid)
+               $cat_ids[$n] = db_escape($cid);
+
        if($ret && count($cat_ids)) {
                array_walk($cat_ids,'db_escape');
                $sql = "INSERT INTO ".TB_PREF."crm_contacts (person_id,type,action,entity_id)