Browse files

Get rid of srand() and switch from random() to mt_rand() to generate …

…the random background.
  • Loading branch information...
1 parent 76e8c20 commit e8bc55ad45957dd1306cdfc6e6ffbcfa0839ff5e @justintadlock committed Sep 8, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 extensions/random-custom-background.php
View
3 extensions/random-custom-background.php
@@ -161,8 +161,7 @@ public function generate_random_background() {
/* Generate a random background from the given set of backgrounds. */
if ( 1 < $count ) {
- srand( (double) microtime() * 1000000 );
- $random = rand( 0, $count - 1 );
+ $random = mt_rand( 0, $count - 1 );
$args = $backgrounds[ $random ];
}

0 comments on commit e8bc55a

Please sign in to comment.