From 971216d93e960bbc22f58c9ebe9aec57b6dcd6d5 Mon Sep 17 00:00:00 2001 From: SteveD Date: Tue, 19 Feb 2013 21:02:59 +0000 Subject: [PATCH] Fix undefined variables --- e107_handlers/online_class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/e107_handlers/online_class.php b/e107_handlers/online_class.php index 3d6505ecd..0c138a138 100755 --- a/e107_handlers/online_class.php +++ b/e107_handlers/online_class.php @@ -255,8 +255,6 @@ class e_online // Sort into usable format and add bot field. $user = array( - 'user_id' => $vals[0], - 'user_name' => $vals[1], 'user_location' => $row['online_location'], 'user_bot' => $this->isBot($row['online_agent']), 'user_agent' => $row['online_agent'], @@ -271,6 +269,8 @@ class e_online if($row['online_user_id'] != 0) { $vals = explode('.', $row['online_user_id'], 2); + $user['user_id'] = $vals[0]; + $user['user_name'] = $vals[1]; $member_list .= "{$vals[1]} "; $listuserson[$row['online_user_id']] = $row['online_location']; @@ -279,6 +279,8 @@ class e_online } else { + $user['user_id'] = 0; + $user['user_name'] = 'guest'; // Maybe should just be an empty string? $this->guests[] = $user; }