FIX wrong socpeople id when multiple assigned + avoid php warnings (#35878)

This commit is contained in:
Regis Houssin
2025-10-22 02:29:05 +02:00
committed by GitHub
parent c04359f995
commit d37cf4b38a
3 changed files with 12 additions and 12 deletions

View File

@@ -15079,12 +15079,12 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null,
if (isset($histo[$key]['socpeopleassigned']) && is_array($histo[$key]['socpeopleassigned']) && count($histo[$key]['socpeopleassigned']) > 0) {
$contactList = '';
foreach ($histo[$key]['socpeopleassigned'] as $cid => $Tab) {
if (empty($conf->cache['contact'][$histo[$key]['contact_id']])) {
if (empty($conf->cache['contact'][$cid])) {
$contact = new Contact($db);
$contact->fetch($cid);
$conf->cache['contact'][$histo[$key]['contact_id']] = $contact;
$conf->cache['contact'][$cid] = $contact;
} else {
$contact = $conf->cache['contact'][$histo[$key]['contact_id']];
$contact = $conf->cache['contact'][$cid];
}
if ($contact) {