Qual: Better type check

This commit is contained in:
Raphaël Doursenaud 2014-04-23 11:24:58 +02:00
parent 01655d1757
commit 83dd3a532b
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ $action=GETPOST('action','alpha');
$update=GETPOST('update','alpha');
$delete=GETPOST('delete'); // Do not use alpha here
$debug=GETPOST('debug','int');
$consts=GETPOST('const');
$consts=GETPOST('const','array');
$constname=GETPOST('constname','alpha');
$constvalue=GETPOST('constvalue');
$constnote=GETPOST('constnote','alpha');

View File

@ -174,7 +174,7 @@ function dol_shutdown()
* @param string $paramname Name of parameter to found
* @param string $check Type of check (''=no check, 'int'=check it's numeric, 'alpha'=check it's text and sign, 'az'=check it's a-z only, 'array'=check it's array)
* @param int $method Type of method (0 = get then post, 1 = only get, 2 = only post, 3 = post then get, 4 = post then get then cookie)
* @return string Value found, or '' if check fails
* @return string||string[] Value found, or '' if check fails
*/
function GETPOST($paramname,$check='',$method=0)
{