Skip to content

Commit ca3c0d0

Browse files
Merge pull request #8628 from Oldiesmann/fix_custom_search
Fix a couple of undefined variables with custom search
2 parents 44160ed + 209303b commit ca3c0d0

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

Sources/Search/APIs/Custom.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,16 @@ public function postRemoved(int $id_msg): void
464464
{
465465
$customIndexSettings = Utils::jsonDecode(Config::$modSettings['search_custom_index_config'], true);
466466

467+
$row = Db::$db->query(
468+
'',
469+
'SELECT body
470+
FROM {db_prefix}messages
471+
WHERE id_msg = {int:id_msg}',
472+
[
473+
'id_msg' => $id_msg,
474+
],
475+
)->fetch_assoc();
476+
467477
$words = self::getWordNumbers($row['body'], $customIndexSettings['bytes_per_word']);
468478

469479
if (!empty($words)) {
@@ -474,7 +484,7 @@ public function postRemoved(int $id_msg): void
474484
AND id_msg = {int:id_msg}',
475485
[
476486
'word_list' => $words,
477-
'id_msg' => $message,
487+
'id_msg' => $id_msg,
478488
],
479489
);
480490
}

0 commit comments

Comments
 (0)