mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-29 06:38:52 +00:00
Prevents an occasional error where the $this->data['session_time'] is undefined.
git-svn-id: file:///svn/phpbb/trunk@5428 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
d864074bdd
commit
bfa6f1d18a
1 changed files with 8 additions and 3 deletions
|
@ -389,6 +389,11 @@ class session
|
||||||
if ($this->data['user_id'] != ANONYMOUS)
|
if ($this->data['user_id'] != ANONYMOUS)
|
||||||
{
|
{
|
||||||
// Delete existing session, update last visit info first!
|
// Delete existing session, update last visit info first!
|
||||||
|
if ( !isset($this->data['session_time']) )
|
||||||
|
{
|
||||||
|
$this->data['session_time'] = time();
|
||||||
|
}
|
||||||
|
|
||||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||||
SET user_lastvisit = ' . (int) $this->data['session_time'] . '
|
SET user_lastvisit = ' . (int) $this->data['session_time'] . '
|
||||||
WHERE user_id = ' . (int) $this->data['user_id'];
|
WHERE user_id = ' . (int) $this->data['user_id'];
|
||||||
|
|
Loading…
Add table
Reference in a new issue