diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php index bced0a3247..c186e7f765 100644 --- a/phpBB/phpbb/content_visibility.php +++ b/phpBB/phpbb/content_visibility.php @@ -439,7 +439,7 @@ class content_visibility if ($post_id) { - $sql = 'SELECT 1 as has_attachments + $sql = 'SELECT 1 AS has_attachments FROM ' . POSTS_TABLE . ' WHERE topic_id = ' . (int) $topic_id . ' AND post_attachment = 1