Update thanks.php

This commit is contained in:
Roman Kelesidis 2025-07-29 22:14:46 +03:00
commit 91c6bbd4de
No known key found for this signature in database
GPG key ID: D8157C4D4C4C6DB4

View file

@ -95,8 +95,9 @@ switch ($mode) {
$thanks_count = count($cached_thanks); $thanks_count = count($cached_thanks);
if ($thanks_count > $tor_thank_limit_per_topic) { if ($thanks_count > $tor_thank_limit_per_topic) {
$oldest_user_id = null; $oldest_user_id = null;
foreach ($cached_thanks as $user_id) { foreach ($cached_thanks as $user_id => $thanks_data) {
$oldest_user_id = $user_id; // First value
$oldest_user_id = $thanks_data['user_id'];
break; break;
} }