From 8f5efa2fa8caa618ab7169457f7b0db9d7a38385 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B8nstantine=20Kovalensky?= <45331093+kovalensky@users.noreply.github.com> Date: Wed, 22 Nov 2023 13:14:31 +0400 Subject: [PATCH] Check topic_id existence while searching in tracker mode (#1155) --- library/ajax/view_post.php | 2 +- styles/templates/default/viewtopic_attach.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/ajax/view_post.php b/library/ajax/view_post.php index 163d15b83..ebe73a428 100644 --- a/library/ajax/view_post.php +++ b/library/ajax/view_post.php @@ -14,7 +14,7 @@ if (!defined('IN_AJAX')) { global $user, $lang; $post_id = isset($this->request['post_id']) ? (int)$this->request['post_id'] : null; -$topic_id = (int)$this->request['topic_id']; +$topic_id = isset($this->request['topic_id']) ? (int)$this->request['topic_id'] : null; if (is_null($post_id)) { $post_id = DB()->fetch_row("SELECT topic_first_post_id FROM " . BB_TOPICS . " WHERE topic_id = $topic_id", 'topic_first_post_id'); diff --git a/styles/templates/default/viewtopic_attach.tpl b/styles/templates/default/viewtopic_attach.tpl index 3da83d6f0..a4350502e 100644 --- a/styles/templates/default/viewtopic_attach.tpl +++ b/styles/templates/default/viewtopic_attach.tpl @@ -169,7 +169,7 @@

{postrow.attach.tor_reged.FILESIZE}

-

...

+

...