mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-12 14:28:56 +00:00
Merge pull request #4615 from marc1706/ticket/14946
[ticket/14946] Make sure to pass integers to max()
This commit is contained in:
commit
70cf5ddf9d
1 changed files with 1 additions and 1 deletions
|
@ -838,7 +838,7 @@ class session
|
||||||
$sql = 'SELECT COUNT(session_id) AS sessions
|
$sql = 'SELECT COUNT(session_id) AS sessions
|
||||||
FROM ' . SESSIONS_TABLE . '
|
FROM ' . SESSIONS_TABLE . '
|
||||||
WHERE session_user_id = ' . (int) $this->data['user_id'] . '
|
WHERE session_user_id = ' . (int) $this->data['user_id'] . '
|
||||||
AND session_time >= ' . (int) ($this->time_now - (max($config['session_length'], $config['form_token_lifetime'])));
|
AND session_time >= ' . (int) ($this->time_now - (max((int) $config['session_length'], (int) $config['form_token_lifetime'])));
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
$row = $db->sql_fetchrow($result);
|
$row = $db->sql_fetchrow($result);
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
Loading…
Add table
Reference in a new issue