diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2013-03-10 22:18:37 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2013-03-10 22:18:37 +0100 |
commit | cc5ba36a061215e0d96f32b67e9f1391e699ac63 (patch) | |
tree | 45b94184f73f5ba93f234649c865336aa85455c4 /phpBB | |
parent | 7db5eec5d28449af2d313f52b4d4c1c4534ba870 (diff) | |
download | forums-cc5ba36a061215e0d96f32b67e9f1391e699ac63.tar forums-cc5ba36a061215e0d96f32b67e9f1391e699ac63.tar.gz forums-cc5ba36a061215e0d96f32b67e9f1391e699ac63.tar.bz2 forums-cc5ba36a061215e0d96f32b67e9f1391e699ac63.tar.xz forums-cc5ba36a061215e0d96f32b67e9f1391e699ac63.zip |
[ticket/9657] Cast IDs to integer
PHPBB3-9657
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/content_visibility.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/phpBB/includes/content_visibility.php b/phpBB/includes/content_visibility.php index 6ca1f8b25c..ac827bd822 100644 --- a/phpBB/includes/content_visibility.php +++ b/phpBB/includes/content_visibility.php @@ -244,13 +244,13 @@ class phpbb_content_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']) { - $poster_postcounts[$row['poster_id']]++; + $poster_postcounts[(int) $row['poster_id']]++; } if (!isset($postcount_visibility[$row['post_visibility']])) @@ -411,12 +411,12 @@ class phpbb_content_visibility // Update the number for replies and posts $sql = 'UPDATE ' . TOPICS_TABLE . ' SET ' . implode(', ', $topic_sql) . ' - WHERE topic_id = ' . $topic_id; + WHERE topic_id = ' . (int) $topic_id; $db->sql_query($sql); $sql = 'UPDATE ' . FORUMS_TABLE . ' SET ' . implode(', ', $forum_sql) . ' - WHERE forum_id = ' . $forum_id; + WHERE forum_id = ' . (int) $forum_id; $db->sql_query($sql); } } |