Merge pull request #15796 from ptibogxiv/patch-400

FIX:  variants v13+
This commit is contained in:
Laurent Destailleur 2020-12-21 18:07:00 +01:00 committed by GitHub
commit afc3528376
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -227,7 +227,7 @@ if (($action == 'add' || $action == 'create') && empty($massaction) && !GETPOST(
$db->commit();
setEventMessages($langs->trans('RecordSaved'), null, 'mesgs');
}
} elseif ($valueid > 0) {
} elseif ($action === 'update' && $valueid > 0) {
if ($prodcomb->fetch($valueid) < 0) {
dol_print_error($db, $langs->trans('ErrorRecordNotFound'));
exit();

View File

@ -29,7 +29,7 @@ $action = GETPOST('action', 'alpha');
* Actions
*/
if ($action == 'create') {
if ($action == 'add') {
if (empty($ref) || empty($label)) {
setEventMessages($langs->trans('ErrorFieldsRequired'), null, 'errors');
} else {