Check topic_id existence while searching in tracker mode (#1155)

This commit is contained in:
Cønstantine Kovalensky 2023-11-22 13:14:31 +04:00 committed by GitHub
commit 8f5efa2fa8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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');