From 48f723df8e1a4fe24d092195addfc22ae420b9c0 Mon Sep 17 00:00:00 2001
From: David <d.siegfried@uni-oldenburg.de>
Date: Wed, 15 Mar 2023 16:12:49 +0100
Subject: [PATCH] prevent php8-warnings, re #16

---
 views/statistics/widgets.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/views/statistics/widgets.php b/views/statistics/widgets.php
index 2424ae6..44f3388 100644
--- a/views/statistics/widgets.php
+++ b/views/statistics/widgets.php
@@ -43,14 +43,14 @@ $PERMS = [
             <td><?= htmlReady($entry['name']) ?></td>
             <td>
             <? if ($entry['enabled']): ?>
-                <?= Icon::create('checkbox-checked', 'info')->asImg(tooltip2(_('Ja'))) ?>
+                <?= Icon::create('checkbox-checked', Icon::ROLE_INFO)->asImg(tooltip2(_('Ja'))) ?>
             <? else: ?>
-                <?= Icon::create('checkbox-unchecked', 'info')->asImg(tooltip2(_('Nein'))) ?>
+                <?= Icon::create('checkbox-unchecked', Icon::ROLE_INFO)->asImg(tooltip2(_('Nein'))) ?>
             <? endif; ?>
             </td>
         <? foreach (array_keys($PERMS) as $perm): ?>
-            <td <? if (!$entry[$perm]) echo 'class="empty"'; ?>>
-                <?= $numberReady($entry[$perm]) ?>
+            <td <? if (empty($entry[$perm])) echo 'class="empty"'; ?>>
+                <?= $numberReady($entry[$perm] ?? 0) ?>
             </td>
         <? endforeach; ?>
             <td>
-- 
GitLab