From 83dd3a532bd70a2403a9a70746f2ff24819e5737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Wed, 23 Apr 2014 11:24:58 +0200 Subject: [PATCH] Qual: Better type check --- htdocs/admin/const.php | 2 +- htdocs/core/lib/functions.lib.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index ae4b9eb35dd..4a80df017cb 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -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'); diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 46cc8e79991..2db0ac1fe29 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -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) {