From 8cc55ae0dfb1473c9c37fd252ebf7a0e678f63fa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 9 May 2012 16:18:59 +0200 Subject: [PATCH] Fix: Warning GETPOST with alpha and int must be used ONLY if content is not a free text. --- htdocs/adherents/admin/adherent.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index a5a66d37721..885e5ebd37c 100644 --- a/htdocs/adherents/admin/adherent.php +++ b/htdocs/adherents/admin/adherent.php @@ -50,7 +50,7 @@ $action = GETPOST('action','alpha'); if ($action == 'update' || $action == 'add') { $constname=GETPOST('constname','alpha'); - $constvalue=(GETPOST('constvalue_'.$constname,'alpha') ? GETPOST('constvalue_'.$constname,'alpha') : GETPOST('constvalue','alpha')); + $constvalue=(GETPOST('constvalue_'.$constname) ? GETPOST('constvalue_'.$constname) : GETPOST('constvalue')); if (($constname=='ADHERENT_CARD_TYPE' || $constname=='ADHERENT_ETIQUETTE_TYPE') && $constvalue == -1) $constvalue=''; if ($constname=='ADHERENT_LOGIN_NOT_REQUIRED') // Invert choice @@ -60,7 +60,7 @@ if ($action == 'update' || $action == 'add') } $consttype=GETPOST('consttype','alpha'); - $constnote=GETPOST('constnote','alpha'); + $constnote=GETPOST('constnote'); $res=dolibarr_set_const($db,$constname,$constvalue,$type[$consttype],0,$constnote,$conf->entity); if (! $res > 0) $error++; @@ -78,7 +78,7 @@ if ($action == 'update' || $action == 'add') // Action activation d'un sous module du module adherent if ($action == 'set') { - $result=dolibarr_set_const($db, GETPOST('name','alpha'),GETPOST('value','alpha'),'',0,'',$conf->entity); + $result=dolibarr_set_const($db, GETPOST('name','alpha'),GETPOST('value'),'',0,'',$conf->entity); if ($result < 0) { print $db->error();