aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions.php14
-rw-r--r--phpBB/includes/session.php8
2 files changed, 13 insertions, 9 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 10cbc4f2d2..d360efa7d9 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1535,16 +1535,19 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
{
case E_NOTICE:
case E_WARNING:
+
if (defined('DEBUG_EXTRA'))
{
- if (!strstr($errfile, 'cache') && !strstr($errfile, 'template.php'))
+ if (strpos($errfile, 'cache') === false && strpos($errfile, 'template.php') === false)
{
echo "<b>PHP Notice</b>: in file <b>$errfile</b> on line <b>$errline</b>: <b>$msg_text</b><br>";
}
}
- break;
+
+ break;
case E_USER_ERROR:
+
if (isset($db))
{
$db->sql_close();
@@ -1583,14 +1586,14 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
echo ' </div>';
echo ' </div>';
echo ' <div id="page-footer">';
- echo ' Powered by phpBB &copy; '.date('Y').' <a href="http://www.phpbb.com/">phpBB Group</a>';
+ echo ' Powered by phpBB &copy; ' . date('Y') . ' <a href="http://www.phpbb.com/">phpBB Group</a>';
echo ' </div>';
echo '</div>';
echo '</body>';
echo '</html>';
exit;
- break;
+ break;
case E_USER_NOTICE:
@@ -1600,6 +1603,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
{
$user->session_begin();
}
+
if (empty($user->lang))
{
$user->setup();
@@ -1642,7 +1646,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
}
exit;
- break;
+ break;
}
}
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 850c063135..532382cc4d 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -382,21 +382,21 @@ class session
global $SID, $db, $config;
$sql = 'DELETE FROM ' . SESSIONS_TABLE . "
- WHERE session_id = '" . $db->sql_escape($this->session_id) . "'
+ WHERE session_id = '" . $db->sql_escape($this->session_id) . "'
AND session_user_id = " . (int) $this->data['user_id'];
$db->sql_query($sql);
if ($this->data['user_id'] != ANONYMOUS)
{
// Delete existing session, update last visit info first!
- if ( !isset($this->data['session_time']) )
+ if (!isset($this->data['session_time']))
{
$this->data['session_time'] = time();
}
$sql = 'UPDATE ' . USERS_TABLE . '
- SET user_lastvisit = ' . (int) $this->data['session_time'] . '
- WHERE user_id = ' . (int) $this->data['user_id'];
+ SET user_lastvisit = ' . (int) $this->data['session_time'] . '
+ WHERE user_id = ' . (int) $this->data['user_id'];
$db->sql_query($sql);
if ($this->cookie_data['k'])