Merge "Fix increment() statsd call in JobRunner"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sat, 6 Aug 2016 01:02:40 +0000 (01:02 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 6 Aug 2016 01:02:40 +0000 (01:02 +0000)
includes/utils/MWCryptRand.php

index f3d72e8..dd3ea1b 100644 (file)
@@ -324,7 +324,7 @@ class MWCryptRand {
                                ": Falling back to using a pseudo random state to generate randomness.\n" );
                }
                while ( strlen( $buffer ) < $bytes ) {
-                       $buffer .= MWCryptHash::hmac( $this->randomState(), mt_rand() );
+                       $buffer .= MWCryptHash::hmac( $this->randomState(), strval( mt_rand() ) );
                        // This code is never really cryptographically strong, if we use it
                        // at all, then set strong to false.
                        $this->strong = false;