From d5749700fc8d88b83a609158ce477676167cbc26 Mon Sep 17 00:00:00 2001 From: Znote Date: Sun, 22 Mar 2020 20:29:55 +0100 Subject: [PATCH] Fix #386 - Warnings in support list. --- engine/function/users.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/function/users.php b/engine/function/users.php index e076f31..bdf0885 100644 --- a/engine/function/users.php +++ b/engine/function/users.php @@ -131,19 +131,19 @@ function support_list() { foreach($staffs as $k => $v) { foreach($staffs as $key => $value) { if($k != $key && $v['account_id'] == $value['account_id']) { - unset($staffs[$k]); + unset($staffs[$k]); } } } + $staffs = array_values($staffs); if ($staffs !== false && $TFS == 'TFS_10') { for ($i = 0; $i < count($staffs); $i++) { // Fix online status on TFS 1.0 - if (user_is_online_10($staffs[$i]['id'])) $staffs[$i]['online'] = 1; - else $staffs[$i]['online'] = 0; + $staffs[$i]['online'] = (isset($staffs[$i]['id']) && user_is_online_10($staffs[$i]['id'])) ? 1 : 0; unset($staffs[$i]['id']); } - } + } return $staffs; }