From ed8caa86bf71ff2a6c0968f8a67a635c8595b379 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Tue, 15 Oct 2019 08:22:23 -0500 Subject: [PATCH] Fix for random issue --- core/imageboard/image.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/imageboard/image.php b/core/imageboard/image.php index c3ecd9fa..f5c84011 100644 --- a/core/imageboard/image.php +++ b/core/imageboard/image.php @@ -115,7 +115,7 @@ class Image if ($max < 1) { return null; } // From Issue #22 - opened by HungryFeline on May 30, 2011. - if ($max > $limit_range) { + if ($limit_range > 0 && $max > $limit_range) { $max = $limit_range; } $rand = mt_rand(0, $max-1);