summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-10-31 13:18:43 +0100
committermsquare <msquare@notrademark.de>2018-10-31 13:43:23 +0100
commit82b22160fde48e726e7413c0f93bbf932d148b4c (patch)
treec5d72eb41cae6bd6cff0b7d8c33141ae5a33ea75 /includes
parenta2aaba9cab6b7bdf755a023ed2503cf8cf46925a (diff)
Fixed error if shirt size is not configured
Diffstat (limited to 'includes')
-rw-r--r--includes/pages/admin_active.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/includes/pages/admin_active.php b/includes/pages/admin_active.php
index 5b0beae9..9bd854c9 100644
--- a/includes/pages/admin_active.php
+++ b/includes/pages/admin_active.php
@@ -211,9 +211,11 @@ function admin_active()
}
}
+ $shirtSize = $usr->personalData->shirt_size;
+
$userData = [];
$userData['nick'] = User_Nick_render($usr);
- $userData['shirt_size'] = $tshirt_sizes[$usr->personalData->shirt_size];
+ $userData['shirt_size'] = (isset($tshirt_sizes[$shirtSize]) ? $tshirt_sizes[$shirtSize] : '');
$userData['work_time'] = round($usr['shift_length'] / 60)
. ' min (' . sprintf('%.2f', $usr['shift_length'] / 3600) . '&nbsp;h)';
$userData['active'] = glyph_bool($usr->state->active == 1);