BUG FIX aray implicitly converted to boolean

This commit is contained in:
Faustin 2022-06-15 15:54:28 +02:00
parent 17133cabb0
commit 80af6c8fdc

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