From 7fd69459dfc33e36202ef30dc6dfcea0063f51a3 Mon Sep 17 00:00:00 2001 From: MDW Date: Fri, 8 Mar 2024 02:54:24 +0100 Subject: [PATCH] Fix: Ensure string type for urlencode() --- htdocs/user/agenda.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/user/agenda.php b/htdocs/user/agenda.php index a9887cc577c..7c692bb9ba4 100644 --- a/htdocs/user/agenda.php +++ b/htdocs/user/agenda.php @@ -89,7 +89,7 @@ if (($object->id != $user->id) && !$user->hasRight('user', 'user', 'lire')) { accessforbidden(); } -$parameters = array('id'=>$userId); +$parameters = array('id' => $userId); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -185,7 +185,7 @@ if (isModEnabled('agenda')) { if (isModEnabled('agenda') && ($user->hasRight('agenda', 'myactions', 'read') || $user->hasRight('agenda', 'allaactions', 'read'))) { print '
'; - $param = '&id='.urlencode($id); + $param = '&id='.urlencode((string) ($id)); if ($limit > 0 && $limit != $conf->liste_limit) { $param .= '&limit='.((int) $limit);