Fix regression

This commit is contained in:
Laurent Destailleur 2023-01-26 02:12:42 +01:00
parent 98e94b9901
commit 59f163f699

View File

@ -1158,12 +1158,17 @@ if (empty($reshook)) {
unset($date);
} else {
$error++;
setEventMessages($object->error, $object->errors, 'errors');
}
}
header("Location: ".$_SERVER["PHP_SELF"]."?id=".GETPOST('id', 'int'));
exit;
if (!$error) {
header("Location: ".$_SERVER["PHP_SELF"]."?id=".GETPOST('id', 'int'));
exit;
} else {
$action = '';
}
}
if ($action == 'confirm_delete_line' && GETPOST("confirm", 'alpha') == "yes" && $user->rights->expensereport->creer) {