Reload object when product clone failed (cause of ref already exists) if

not done result is blanck pages (header wannot be rewrite (location
herder index.php) around line 1542
This commit is contained in:
Florian HENRY 2014-10-16 13:57:07 +02:00
parent 722f6e0db6
commit eeffe4ed34

View File

@ -422,10 +422,10 @@ if (empty($reshook))
$_error++;
$action = "";
$mesg='<div class="error">'.$langs->trans("ErrorProductAlreadyExists",$object->ref);
$mesg=$langs->trans("ErrorProductAlreadyExists",$object->ref);
$mesg.=' <a href="'.$_SERVER["PHP_SELF"].'?ref='.$object->ref.'">'.$langs->trans("ShowCardHere").'</a>.';
$mesg.='</div>';
setEventMessage($mesg, 'errors');
$object->fetch($id);
//dol_print_error($object->db);
}
else