FIX - The test for fetch the third party is not necessary because the thirdparty is not required on a event and it's not required for send the reminder by email to the user. (#34731)

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
kkhelifa-opendsi
2025-08-07 16:22:35 +02:00
committed by GitHub
parent ba09a8ee84
commit e85e15b4fd

View File

@@ -2710,10 +2710,9 @@ class ActionComm extends CommonObject
// Load event // Load event
$res = $this->fetch($actionCommReminder->fk_actioncomm); $res = $this->fetch($actionCommReminder->fk_actioncomm);
if ($res > 0) { if ($res > 0) {
$res2 = $this->fetch_thirdparty();
if ($res2 >= 0) {
// PREPARE EMAIL // PREPARE EMAIL
$errormesg = ''; $errormesg = '';
$this->fetch_thirdparty();
// Make substitution in email content // Make substitution in email content
$substitutionarray = getCommonSubstitutionArray($langs, 0, null, $this); $substitutionarray = getCommonSubstitutionArray($langs, 0, null, $this);
@@ -2786,10 +2785,6 @@ class ActionComm extends CommonObject
$errorsMsg[] = $errormesg; $errorsMsg[] = $errormesg;
} }
} }
} else {
$errorsMsg[] = 'Failed to fetch record thirdparty on actioncomm with ID = '.$actionCommReminder->fk_actioncomm;
$error++;
}
} else { } else {
$errorsMsg[] = 'Failed to fetch record actioncomm with ID = '.$actionCommReminder->fk_actioncomm; $errorsMsg[] = 'Failed to fetch record actioncomm with ID = '.$actionCommReminder->fk_actioncomm;
$error++; $error++;