Added explicit type-cast to hash_pbkdf2
authorTyler Romeo <tylerromeo@gmail.com>
Tue, 29 Jul 2014 15:55:34 +0000 (11:55 -0400)
committerParent5446 <tylerromeo@gmail.com>
Tue, 29 Jul 2014 15:57:47 +0000 (15:57 +0000)
It seems HHVM does not like the use of
dynamic typing  in hash_pbkdf2() (also it's
kind of not the best idea in general), so
added explicit (int) casting to parameters.

Follows-up: I0a9c972931a0eff0cfb2619cef3ddffd03710285
Change-Id: I8adae3cc2cdf8029be59e2d62a3ab0fbfb73b7aa

includes/password/Pbkdf2Password.php

index 417753f..080e3b0 100644 (file)
@@ -51,8 +51,8 @@ class Pbkdf2Password extends ParameterizedPassword {
                                $this->params['algo'],
                                $password,
                                base64_decode( $this->args[0] ),
-                               $this->params['rounds'],
-                               $this->params['length'],
+                               (int)$this->params['rounds'],
+                               (int)$this->params['length'],
                                true
                        );
                } else {