From 7155358f123c745bf1d81861b47f61bcde45c0fa Mon Sep 17 00:00:00 2001 From: MDW Date: Fri, 8 Mar 2024 02:51:46 +0100 Subject: [PATCH] Fix: Ensure string type for urlencode() --- htdocs/hrm/job_agenda.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/hrm/job_agenda.php b/htdocs/hrm/job_agenda.php index 074f5e008f1..6fffa6934e4 100644 --- a/htdocs/hrm/job_agenda.php +++ b/htdocs/hrm/job_agenda.php @@ -108,7 +108,7 @@ if (!$permissiontoread) { * Actions */ -$parameters = array('id'=>$id); +$parameters = array('id' => $id); $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'); @@ -155,7 +155,7 @@ if ($object->id > 0) { $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
'; - $morehtmlref.= $object->label; + $morehtmlref .= $object->label; $morehtmlref .= '
'; @@ -178,14 +178,14 @@ if ($object->id > 0) { $objthirdparty = $object; $objcon = new stdClass(); - $out = '&origin='.urlencode($object->element.'@'.$object->module).'&originid='.urlencode($object->id); + $out = '&origin='.urlencode((string) ($object->element.'@'.$object->module)).'&originid='.urlencode((string) ($object->id)); $urlbacktopage = $_SERVER['PHP_SELF'].'?id='.$object->id; $out .= '&backtopage='.urlencode($urlbacktopage); $permok = $user->hasRight('agenda', 'myactions', 'create'); if ((!empty($objthirdparty->id) || !empty($objcon->id)) && $permok) { //$out.='