mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/9657] Cast IDs to integer
PHPBB3-9657
This commit is contained in:
parent
7db5eec5d2
commit
cc5ba36a06
1 changed files with 5 additions and 5 deletions
|
@ -244,13 +244,13 @@ class phpbb_content_visibility
|
||||||
|
|
||||||
if ($row['post_visibility'] != $visibility)
|
if ($row['post_visibility'] != $visibility)
|
||||||
{
|
{
|
||||||
if ($row['post_postcount'] && !isset($poster_postcounts[$row['poster_id']]))
|
if ($row['post_postcount'] && !isset($poster_postcounts[(int) $row['poster_id']]))
|
||||||
{
|
{
|
||||||
$poster_postcounts[$row['poster_id']] = 1;
|
$poster_postcounts[(int) $row['poster_id']] = 1;
|
||||||
}
|
}
|
||||||
else if ($row['post_postcount'])
|
else if ($row['post_postcount'])
|
||||||
{
|
{
|
||||||
$poster_postcounts[$row['poster_id']]++;
|
$poster_postcounts[(int) $row['poster_id']]++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($postcount_visibility[$row['post_visibility']]))
|
if (!isset($postcount_visibility[$row['post_visibility']]))
|
||||||
|
@ -411,12 +411,12 @@ class phpbb_content_visibility
|
||||||
// Update the number for replies and posts
|
// Update the number for replies and posts
|
||||||
$sql = 'UPDATE ' . TOPICS_TABLE . '
|
$sql = 'UPDATE ' . TOPICS_TABLE . '
|
||||||
SET ' . implode(', ', $topic_sql) . '
|
SET ' . implode(', ', $topic_sql) . '
|
||||||
WHERE topic_id = ' . $topic_id;
|
WHERE topic_id = ' . (int) $topic_id;
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
|
|
||||||
$sql = 'UPDATE ' . FORUMS_TABLE . '
|
$sql = 'UPDATE ' . FORUMS_TABLE . '
|
||||||
SET ' . implode(', ', $forum_sql) . '
|
SET ' . implode(', ', $forum_sql) . '
|
||||||
WHERE forum_id = ' . $forum_id;
|
WHERE forum_id = ' . (int) $forum_id;
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue