Fix for random issue
This commit is contained in:
parent
3efa76c6a2
commit
ed8caa86bf
1 changed files with 1 additions and 1 deletions
|
@ -115,7 +115,7 @@ class Image
|
||||||
if ($max < 1) {
|
if ($max < 1) {
|
||||||
return null;
|
return null;
|
||||||
} // From Issue #22 - opened by HungryFeline on May 30, 2011.
|
} // From Issue #22 - opened by HungryFeline on May 30, 2011.
|
||||||
if ($max > $limit_range) {
|
if ($limit_range > 0 && $max > $limit_range) {
|
||||||
$max = $limit_range;
|
$max = $limit_range;
|
||||||
}
|
}
|
||||||
$rand = mt_rand(0, $max-1);
|
$rand = mt_rand(0, $max-1);
|
||||||
|
|
Reference in a new issue