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.
This commit is contained in:
thibdrev 2024-01-24 21:51:48 +01:00 committed by GitHub
parent c451526d2a
commit 3da89dc35c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;