From a8f11fec31c4ec4e89ab08f82734dcb0ba96651f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 11 Jun 2021 18:12:39 +0200 Subject: [PATCH] Update perweek.php --- htdocs/projet/activity/perweek.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php index 0db7bf57f3a..97626c58e50 100644 --- a/htdocs/projet/activity/perweek.php +++ b/htdocs/projet/activity/perweek.php @@ -224,7 +224,7 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('assigntask') { // Test if we are already contact of the project (should be rare but sometimes we can add as task contact without being contact of project, like when admin user has been removed from contact of project) $sql = 'SELECT ec.rowid FROM '.MAIN_DB_PREFIX.'element_contact as ec, '.MAIN_DB_PREFIX.'c_type_contact as tc WHERE tc.rowid = ec.fk_c_type_contact'; - $sql .= ' AND ec.fk_socpeople = '.$idfortaskuser." AND ec.element_id = ".$object->fk_project." AND tc.element = 'project' AND source = 'internal'"; + $sql .= ' AND ec.fk_socpeople = '.((int) $idfortaskuser)." AND ec.element_id = ".((int) $object->fk_project)." AND tc.element = 'project' AND source = 'internal'"; $resql = $db->query($sql); if ($resql) {