Fixed identical background color for LetterAvatar on 32bits platforms

This commit is contained in:
Frederic Guillot
2016-06-29 21:45:28 -04:00
parent 6c24ec5784
commit 1aab142127
3 changed files with 3 additions and 2 deletions

View File

@@ -142,7 +142,7 @@ class LetterAvatarProvider extends Base implements AvatarProviderInterface
// Make hash more sensitive for short string like 'a', 'b', 'c'
$str .= 'x';
$max = intval(9007199254740991 / $seed2);
$max = intval(PHP_INT_MAX / $seed2);
for ($i = 0, $ilen = mb_strlen($str, 'UTF-8'); $i < $ilen; $i++) {
if ($hash > $max) {