mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-23 09:07:43 +02:00
[ticket/14748] Make sure config values are casted to int
PHPBB3-14748
This commit is contained in:
parent
f814840568
commit
0048c2b613
phpBB
@ -853,7 +853,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
|
||||
$tracking['tf'][$forum_id][$topic_id36] = true;
|
||||
}
|
||||
|
||||
$tracking['t'][$topic_id36] = base_convert($post_time - $config['board_startdate'], 10, 36);
|
||||
$tracking['t'][$topic_id36] = base_convert($post_time - (int) $config['board_startdate'], 10, 36);
|
||||
|
||||
// If the cookie grows larger than 10000 characters we will remove the smallest value
|
||||
// This can result in old topics being unread - but most of the time it should be accurate...
|
||||
|
@ -103,7 +103,7 @@ class timezone extends \phpbb\db\migration\migration
|
||||
*/
|
||||
public function convert_phpbb30_timezone($timezone, $dst)
|
||||
{
|
||||
$offset = $timezone + $dst;
|
||||
$offset = (int) $timezone + (int) $dst;
|
||||
|
||||
switch ($timezone)
|
||||
{
|
||||
|
@ -286,7 +286,7 @@ class base
|
||||
|
||||
$sql = 'DELETE
|
||||
FROM ' . SEARCH_RESULTS_TABLE . '
|
||||
WHERE search_time < ' . (time() - $config['search_store_results']);
|
||||
WHERE search_time < ' . (time() - (int) $config['search_store_results']);
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user