From ffa4e58addc09215dcbe79d540b41bd912acf2b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 12 Feb 2023 20:26:40 +0100 Subject: [PATCH 1/2] fix warning listUsersForGroup with mode = 1 return array of user id --- htdocs/holiday/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index 42c64613933..05568e08992 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -3,7 +3,7 @@ * Copyright (C) 2013-2020 Laurent Destailleur * Copyright (C) 2012-2016 Regis Houssin * Copyright (C) 2018 Charlene Benke - * Copyright (C) 2019-2022 Frédéric France + * Copyright (C) 2019-2023 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -620,7 +620,7 @@ if ($resql) { $valideurobjects = $validator->listUsersForGroup($excludefilter, 1); $valideurarray = array(); foreach ($valideurobjects as $val) { - $valideurarray[$val->id] = $val->id; + $valideurarray[$val] = $val; } print $form->select_dolusers($search_valideur, "search_valideur", 1, "", 0, $valideurarray, '', 0, 0, 0, $morefilter, 0, '', 'maxwidth125'); print ''; From 814075d36b943413bc244bfeffa7619a703203e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 12 Feb 2023 20:28:39 +0100 Subject: [PATCH 2/2] Update view_log.php --- htdocs/holiday/view_log.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/holiday/view_log.php b/htdocs/holiday/view_log.php index 4235b7261eb..d0ba35add68 100644 --- a/htdocs/holiday/view_log.php +++ b/htdocs/holiday/view_log.php @@ -336,7 +336,7 @@ if (!empty($arrayfields['cpl.fk_user_action']['checked'])) { $valideurobjects = $validator->listUsersForGroup($excludefilter, 1); $valideurarray = array(); foreach ($valideurobjects as $val) { - $valideurarray[$val->id] = $val->id; + $valideurarray[$val] = $val; } print '';