Merge pull request #21286 from fboitel/fboitel-dev-scrutinizer-013

BUG FIX aray implicitly converted to boolean
This commit is contained in:
Laurent Destailleur 2022-06-17 14:23:12 +02:00 committed by GitHub
commit 82a13f89ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -404,7 +404,7 @@ print load_fiche_titre($langs->trans("CommentsOfVoters"), '', '');
// Comment list
$comments = $object->getComments();
if ($comments) {
if (!empty($comments)) {
foreach ($comments as $comment) {
if ($user->rights->opensurvey->write) {
print '<a class="reposition" href="'.DOL_URL_ROOT.'/opensurvey/card.php?action=deletecomment&token='.newToken().'&idcomment='.((int) $comment->id_comment).'&id='.urlencode($numsondage).'"> '.img_picto('', 'delete.png', '', false, 0, 0, '', '', 0).'</a> ';