From f0110cead60cb1ab18edf4000a36a9d9e4b18d3e Mon Sep 17 00:00:00 2001 From: Matthieu Leproux Date: Tue, 19 Oct 2021 13:45:32 +0200 Subject: [PATCH] related to #1524 API username variication update --- include/ws_functions/pwg.users.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ws_functions/pwg.users.php b/include/ws_functions/pwg.users.php index 843998952..62ec8759e 100644 --- a/include/ws_functions/pwg.users.php +++ b/include/ws_functions/pwg.users.php @@ -497,7 +497,7 @@ function ws_users_setInfo($params, &$service) return new PwgError(403, 'Invalid security token'); } - if (strlen(str_replace( " ", "", $params['username'])) == 0) { + if (isset($params['username']) and strlen(str_replace( " ", "", $params['username'])) == 0) { return new PwgError(WS_ERR_INVALID_PARAM, 'Name field must not be empty'); }