From fcec5b61daecb4a0174418d3851ee1e0e8a0d93c Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 8 Mar 2007 15:49:13 +0000 Subject: again... some more fixes. git-svn-id: file:///svn/phpbb/trunk@7150 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/session.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'phpBB/includes/session.php') diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 80fd7e0687..454c4fd648 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -915,6 +915,12 @@ class session if ($banned && !$return) { + // If the session is empty we need to create a valid one... + if (empty($this->session_id)) + { + $this->session_create(ANONYMOUS); + } + // Initiate environment ... since it won't be set at this stage $this->setup(); @@ -941,6 +947,13 @@ class session $this->session_kill(false); } + // Ok, we catch the case of an empty session id for the anonymous user... + // This can happen if the user is logging in, banned by username and the login_box() being called "again". + if (empty($this->session_id)) + { + $this->session_create(ANONYMOUS); + } + // Determine which message to output $till_date = ($ban_row['ban_end']) ? $this->format_date($ban_row['ban_end']) : ''; $message = ($ban_row['ban_end']) ? 'BOARD_BAN_TIME' : 'BOARD_BAN_PERM'; -- cgit v1.2.1