diff --git a/forum.php b/forum.php
index 2d04c13..2442614 100644
--- a/forum.php
+++ b/forum.php
@@ -553,6 +553,8 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
$sort_type = 'DESC';
}
+ if (empty($_GET['page'])) $_GET['page'] = "";
+
#$data = mysql_query("SELECT * FROM `forum` WHERE `parent` = '" . mysql_real_escape_string($_GET['topic']) . "' ORDER by `id` {$sort_type} LIMIT " . (int)($_GET['page'] * 20) . ",20");
$data = db::c()->query('SELECT * FROM `forum` WHERE `parent` = "?s" ORDER BY "?s" LIMIT ?i,20', $_GET['topic'], $sort_type, ($_GET['page'] * 20));
while ($row = $data->fetch_assoc()) {
@@ -596,6 +598,7 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
if (($closed == 1 && $_GET['topic'] != 228043095)) {
echo "