From c3265c913817e5e774d30993c181d70e853b60d4 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 20 Feb 2012 01:52:33 +0100 Subject: [PATCH] [ticket/10639] Do not allow negative post count as rank's minimum posts PHPBB3-10639 --- phpBB/includes/acp/acp_ranks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/acp/acp_ranks.php b/phpBB/includes/acp/acp_ranks.php index dfd7511427..ea057cd84c 100644 --- a/phpBB/includes/acp/acp_ranks.php +++ b/phpBB/includes/acp/acp_ranks.php @@ -52,7 +52,7 @@ class acp_ranks } $rank_title = utf8_normalize_nfc(request_var('title', '', true)); $special_rank = request_var('special_rank', 0); - $min_posts = ($special_rank) ? 0 : request_var('min_posts', 0); + $min_posts = ($special_rank) ? 0 : max(0, request_var('min_posts', 0)); $rank_image = request_var('rank_image', ''); // The rank image has to be a jpg, gif or png