diff --git a/phpBB/phpbb/search/backend/base.php b/phpBB/phpbb/search/backend/base.php index a68588e97a..58e7be83f4 100644 --- a/phpBB/phpbb/search/backend/base.php +++ b/phpBB/phpbb/search/backend/base.php @@ -399,7 +399,7 @@ abstract class base implements search_backend_interface $this->index_remove($ids, $posters, $forum_ids); } - $post_counter = end($ids); + $post_counter = $ids[count($ids) - 1]; } if ($post_counter <= $max_post_id)