From 3da89dc35c1506bb95a74afc1c8e8b7a55ff99c9 Mon Sep 17 00:00:00 2001 From: thibdrev Date: Wed, 24 Jan 2024 21:51:48 +0100 Subject: [PATCH] qual: phpstan for htdocs/core/actions_comments.inc.php htdocs/core/actions_comments.inc.php 41 Property Comment::$fk_element (int) does not accept array|string. --- htdocs/core/actions_comments.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/actions_comments.inc.php b/htdocs/core/actions_comments.inc.php index 4d901fbc801..e5007d90752 100644 --- a/htdocs/core/actions_comments.inc.php +++ b/htdocs/core/actions_comments.inc.php @@ -38,7 +38,7 @@ if ($action == 'addcomment') { if (!empty($description)) { $comment->description = $description; $comment->datec = dol_now(); - $comment->fk_element = GETPOST('id', 'int'); + $comment->fk_element = GETPOSTINT('id'); $comment->element_type = GETPOST('comment_element_type', 'alpha'); $comment->fk_user_author = $user->id; $comment->entity = $conf->entity;