From 32d2b0a9d620119b48b9bba6c5574d37f476e3ff 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index c636200bdf4..4a2ccf210f6 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(); @@ -271,4 +271,4 @@ dol_fiche_end(); llxFooter(); $db->close(); -?> \ No newline at end of file +?>