diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php
index c0919570c11..26646f79b6c 100644
--- a/htdocs/core/class/notify.class.php
+++ b/htdocs/core/class/notify.class.php
@@ -796,13 +796,13 @@ class Notify
break;
case 'PROPAL_VALIDATE':
$link = ''.$newref.'';
- $dir_output = $conf->propal->multidir_output[$object->entity]."/".get_exdir(0, 0, 0, 1, $object, 'propal');
+ $dir_output = $conf->propal->multidir_output[$object->entity ?? $conf->entity]."/".get_exdir(0, 0, 0, 1, $object, 'propal');
$object_type = 'propal';
$mesg = $outputlangs->transnoentitiesnoconv("EMailTextProposalValidated", $link);
break;
case 'PROPAL_CLOSE_REFUSED':
$link = ''.$newref.'';
- $dir_output = $conf->propal->multidir_output[$object->entity]."/".get_exdir(0, 0, 0, 1, $object, 'propal');
+ $dir_output = $conf->propal->multidir_output[$object->entity ?? $conf->entity]."/".get_exdir(0, 0, 0, 1, $object, 'propal');
$object_type = 'propal';
$labeltouse = getDolGlobalString('PROPAL_CLOSE_REFUSED_TEMPLATE');
$mesg = $outputlangs->transnoentitiesnoconv("EMailTextProposalClosedRefused", $link);
@@ -812,7 +812,7 @@ class Notify
break;
case 'PROPAL_CLOSE_SIGNED':
$link = ''.$newref.'';
- $dir_output = $conf->propal->multidir_output[$object->entity]."/".get_exdir(0, 0, 0, 1, $object, 'propal');
+ $dir_output = $conf->propal->multidir_output[$object->entity ?? $conf->entity]."/".get_exdir(0, 0, 0, 1, $object, 'propal');
$object_type = 'propal';
$mesg = $outputlangs->transnoentitiesnoconv("EMailTextProposalClosedSigned", $link);
if (!empty($object->context['closedfromonlinesignature'])) {
@@ -846,7 +846,7 @@ class Notify
break;
case 'ORDER_SUPPLIER_VALIDATE':
$link = ''.$newref.'';
- $dir_output = $conf->fournisseur->commande->multidir_output[$object->entity]."/".get_exdir(0, 0, 0, 1, $object);
+ $dir_output = $conf->fournisseur->commande->multidir_output[$object->entity ?? $conf->entity]."/".get_exdir(0, 0, 0, 1, $object);
$object_type = 'order_supplier';
$labeltouse = isset($conf->global->ORDER_SUPPLIER_VALIDATE_TEMPLATE) ? $conf->global->ORDER_SUPPLIER_VALIDATE_TEMPLATE : '';
$mesg = $outputlangs->transnoentitiesnoconv("Hello").",\n\n";
@@ -855,7 +855,7 @@ class Notify
break;
case 'ORDER_SUPPLIER_CANCEL':
$link = ''.$newref.'';
- $dir_output = $conf->fournisseur->commande->multidir_output[$object->entity]."/".get_exdir(0, 0, 0, 1, $object);
+ $dir_output = $conf->fournisseur->commande->multidir_output[$object->entity ?? $conf->entity]."/".get_exdir(0, 0, 0, 1, $object);
$object_type = 'order_supplier';
$mesg = $outputlangs->transnoentitiesnoconv("Hello").",\n\n";
$mesg .= $outputlangs->transnoentitiesnoconv("EMailTextSupplierOrderCanceledBy", $link, $user->getFullName($outputlangs));
@@ -863,7 +863,7 @@ class Notify
break;
case 'ORDER_SUPPLIER_APPROVE':
$link = ''.$newref.'';
- $dir_output = $conf->fournisseur->commande->multidir_output[$object->entity]."/".get_exdir(0, 0, 0, 1, $object);
+ $dir_output = $conf->fournisseur->commande->multidir_output[$object->entity ?? $conf->entity]."/".get_exdir(0, 0, 0, 1, $object);
$object_type = 'order_supplier';
$labeltouse = isset($conf->global->ORDER_SUPPLIER_APPROVE_TEMPLATE) ? $conf->global->ORDER_SUPPLIER_APPROVE_TEMPLATE : '';
$mesg = $outputlangs->transnoentitiesnoconv("Hello").",\n\n";
@@ -872,7 +872,7 @@ class Notify
break;
case 'ORDER_SUPPLIER_SUBMIT':
$link = ''.$newref.'';
- $dir_output = $conf->fournisseur->commande->multidir_output[$object->entity]."/".get_exdir(0, 0, 0, 1, $object);
+ $dir_output = $conf->fournisseur->commande->multidir_output[$object->entity ?? $conf->entity]."/".get_exdir(0, 0, 0, 1, $object);
$object_type = 'order_supplier';
$mesg = $outputlangs->transnoentitiesnoconv("Hello").",\n\n";
$mesg .= $outputlangs->transnoentitiesnoconv("EMailTextSupplierOrderSubmittedBy", $link, $user->getFullName($outputlangs));
@@ -880,7 +880,7 @@ class Notify
break;
case 'ORDER_SUPPLIER_REFUSE':
$link = ''.$newref.'';
- $dir_output = $conf->fournisseur->commande->multidir_output[$object->entity]."/".get_exdir(0, 0, 0, 1, $object);
+ $dir_output = $conf->fournisseur->commande->multidir_output[$object->entity ?? $conf->entity]."/".get_exdir(0, 0, 0, 1, $object);
$object_type = 'order_supplier';
$labeltouse = isset($conf->global->ORDER_SUPPLIER_REFUSE_TEMPLATE) ? $conf->global->ORDER_SUPPLIER_REFUSE_TEMPLATE : '';
$mesg = $outputlangs->transnoentitiesnoconv("Hello").",\n\n";