Skip to content

Commit c300546

Browse files
authored
Use built-in to get random array value (#798)
1 parent 745fb91 commit c300546

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
@@ -478,7 +478,7 @@ public function rewrite($url, $mapping_kind, $postfix = false)
478478

479479
// If filetype to url is one to many, need to random one
480480
if (is_array($final_url)) {
481-
$final_url = $final_url[mt_rand(0, count($final_url) - 1)];
481+
$final_url = $final_url[array_rand($final_url)];
482482
}
483483

484484
// Now lets replace CDN url

0 commit comments

Comments
 (0)