Skip to content

Commit 42a6672

Browse files
authored
Merge pull request #85 from mlund01/master
Allow bucketing attributes to be integers
2 parents 04d3f6f + 113a2a5 commit 42a6672

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)