mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
Merge pull request #5904 from 3D-I/ticket/13914
[ticket/13914] Cast to INT mixed style ID data in user setup
This commit is contained in:
@@ -262,8 +262,8 @@ class user extends \phpbb\session
|
|||||||
}
|
}
|
||||||
|
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
FROM ' . STYLES_TABLE . " s
|
FROM ' . STYLES_TABLE . '
|
||||||
WHERE s.style_id = $style_id";
|
WHERE style_id = ' . (int) $style_id;
|
||||||
$result = $db->sql_query($sql, 3600);
|
$result = $db->sql_query($sql, 3600);
|
||||||
$this->style = $db->sql_fetchrow($result);
|
$this->style = $db->sql_fetchrow($result);
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
@@ -274,8 +274,8 @@ class user extends \phpbb\session
|
|||||||
$style_id = $this->data['user_style'];
|
$style_id = $this->data['user_style'];
|
||||||
|
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
FROM ' . STYLES_TABLE . " s
|
FROM ' . STYLES_TABLE . '
|
||||||
WHERE s.style_id = $style_id";
|
WHERE style_id = ' . (int) $style_id;
|
||||||
$result = $db->sql_query($sql, 3600);
|
$result = $db->sql_query($sql, 3600);
|
||||||
$this->style = $db->sql_fetchrow($result);
|
$this->style = $db->sql_fetchrow($result);
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
Reference in New Issue
Block a user