diff --git a/htdocs/admin/menus/edit.php b/htdocs/admin/menus/edit.php index bf4ac3f8979..9378fc28bbe 100644 --- a/htdocs/admin/menus/edit.php +++ b/htdocs/admin/menus/edit.php @@ -172,12 +172,12 @@ if ($action == 'add') { $action = 'create'; $error++; } - if (!$error && GETPOST('menuId') && GETPOST('type') == 'top') { + if (!$error && GETPOST('menuId', 'alphanohtml', 3) && GETPOST('type') == 'top') { setEventMessages($langs->trans("ErrorTopMenuMustHaveAParentWithId0"), null, 'errors'); $action = 'create'; $error++; } - if (!$error && !GETPOST('menuId') && GETPOST('type') == 'left') { + if (!$error && !GETPOST('menuId', 'alphanohtml', 3) && GETPOST('type') == 'left') { setEventMessages($langs->trans("ErrorLeftMenuMustHaveAParentId"), null, 'errors'); $action = 'create'; $error++;