Skip to content

Commit 780a220

Browse files
Roy-OrbisonHai Zheng
authored and
Hai Zheng
committed
Use built-in to get random array value (#798)
1 parent 37ad1d9 commit 780a220

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cdn.cls.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ public function rewrite($url, $mapping_kind, $postfix = false)
483483

484484
// If filetype to url is one to many, need to random one
485485
if (is_array($final_url)) {
486-
$final_url = $final_url[mt_rand(0, count($final_url) - 1)];
486+
$final_url = $final_url[array_rand($final_url)];
487487
}
488488

489489
// Now lets replace CDN url

0 commit comments

Comments
 (0)