Fix warning php 8.2

This commit is contained in:
Laurent Destailleur 2023-03-26 18:48:29 +02:00
parent b5bb93d3ba
commit cff11abce4
2 changed files with 7 additions and 2 deletions

View File

@ -375,6 +375,11 @@ class modEventOrganization extends DolibarrModules
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
$formmail = new FormMail($this->db); $formmail = new FormMail($this->db);
include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
if (!is_object($user)) {
$user = new User($this->db); // To avoid error during migration
}
$template = $formmail->getEMailTemplate($this->db, 'conferenceorbooth', $user, $langs, 0, 1, '(EventOrganizationEmailAskConf)'); $template = $formmail->getEMailTemplate($this->db, 'conferenceorbooth', $user, $langs, 0, 1, '(EventOrganizationEmailAskConf)');
if ($template->id > 0) { if ($template->id > 0) {
dolibarr_set_const($this->db, 'EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_CONF', $template->id, 'chaine', 0, '', $conf->entity); dolibarr_set_const($this->db, 'EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_CONF', $template->id, 'chaine', 0, '', $conf->entity);