diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index eea7f88892..2e7600b000 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -114,6 +114,7 @@
[Fix] Prepend phpbb_root_path to ranks path for displaying ranks (Bug #19075)
[Fix] Allow forum notifications if topic notifications are disabled but forum notifications enabled (Bug #14765)
[Fix] Fixing realpath issues for provider returning the passed value instead of disabling it. This fixes issues with confirm boxes for those hosted on Network Solutions for example. (Bug #20435)
+ [Fix] Try to sort last active date on memberlist correctly at least on current page (Bug #18665)
1.i. Changes since 3.0.RC8
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index f7c9d101a8..d021581cb2 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -1369,7 +1369,8 @@ switch ($mode)
if ($sort_key == 'l')
{
$lesser_than = ($sort_dir == 'a') ? -1 : 1;
- uasort($id_cache, create_function('$first, $second', "return (\$first['last_visit'] == \$second['last_visit']) ? 0 : ((\$first['last_visit'] < \$second['last_visit']) ? $lesser_than : ($lesser_than * -1));"));
+// uasort($id_cache, create_function('$first, $second', "return (\$first['last_visit'] == \$second['last_visit']) ? 0 : ((\$first['last_visit'] < \$second['last_visit']) ? $lesser_than : ($lesser_than * -1));"));
+ usort($user_list, create_function('$first, $second', "global \$id_cache; return (\$id_cache[\$first]['last_visit'] == \$id_cache[\$second]['last_visit']) ? 0 : ((\$id_cache[\$first]['last_visit'] < \$id_cache[\$second]['last_visit']) ? $lesser_than : ($lesser_than * -1));"));
}
for ($i = 0, $end = sizeof($user_list); $i < $end; ++$i)