Skip to content

Commit 551d84c

Browse files
author
Max Lund
committed
allow integer values to be used for bucketing
1 parent 909ccbc commit 551d84c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/LaunchDarkly/VariationOrRollout.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ private function bucketUser($user, $_key, $attr, $_salt) {
7272
$userValue = $user->getValueForEvaluation($attr);
7373
$idHash = null;
7474
if ($userValue != null) {
75+
if (is_int($userValue)) {
76+
$userValue = (string)$userValue;
77+
}
7578
if (is_string($userValue)) {
7679
$idHash = $userValue;
7780
if ($user->getSecondary() !== null) {

0 commit comments

Comments
 (0)