From 91c6bbd4de003a629c320c203b6f21cd11829efd Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Tue, 29 Jul 2025 22:14:46 +0300 Subject: [PATCH] Update thanks.php --- library/ajax/thanks.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/ajax/thanks.php b/library/ajax/thanks.php index 0459cabd3..bf536cdd7 100644 --- a/library/ajax/thanks.php +++ b/library/ajax/thanks.php @@ -95,8 +95,9 @@ switch ($mode) { $thanks_count = count($cached_thanks); if ($thanks_count > $tor_thank_limit_per_topic) { $oldest_user_id = null; - foreach ($cached_thanks as $user_id) { - $oldest_user_id = $user_id; + foreach ($cached_thanks as $user_id => $thanks_data) { + // First value + $oldest_user_id = $thanks_data['user_id']; break; }