Fix : presend on reception resulted in fatal error (#36794)

This commit is contained in:
Maxime Kohlhaas
2026-01-05 14:39:42 +01:00
committed by GitHub
parent 3b6d803bbd
commit ff8a8f5bb4

View File

@@ -333,6 +333,13 @@ if ($action == 'presend') {
if (!empty($origin) && !empty($origin_id)) {
$element = $subelement = $origin;
if ($element == 'order_supplier') {
$element = 'fourn';
$subelement = 'fournisseur.commande';
$origin = 'CommandeFournisseur';
}
$regs = array();
if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) {
$element = $regs[1];
@@ -355,10 +362,6 @@ if ($action == 'presend') {
if ($element == 'shipping') {
$element = $subelement = 'expedition';
}
if ($element == 'order_supplier') {
$element = 'fourn';
$subelement = 'fournisseur.commande';
}
if ($element == 'project') {
$element = 'projet';
}