mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-23 17:10:53 +01:00
[ticket/15201] Add casting
PHPBB3-15201
This commit is contained in:
parent
4b1ec6abb7
commit
bace8dd31f
@ -165,7 +165,7 @@ class style_update_p1 extends \phpbb\db\migration\migration
|
||||
|
||||
$this->config->set('default_style', $default_style);
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . ' SET user_style = ' . $default_style;
|
||||
$sql = 'UPDATE ' . USERS_TABLE . ' SET user_style = ' . (int) $default_style;
|
||||
$this->sql_query($sql);
|
||||
}
|
||||
else
|
||||
|
@ -43,8 +43,8 @@ class fix_user_styles extends \phpbb\db\migration\migration
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
// Set the default style to users who have an invalid style
|
||||
$this->sql_query('UPDATE ' . USERS_TABLE . "
|
||||
SET user_style = $default_style
|
||||
WHERE " . $this->db->sql_in_set('user_style', $enabled_styles, true));
|
||||
$this->sql_query('UPDATE ' . USERS_TABLE . '
|
||||
SET user_style = ' . (int) $default_style . '
|
||||
WHERE ' . $this->db->sql_in_set('user_style', $enabled_styles, true));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user