From 1aab14212729c561244196de30243fe920dd0d8b Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Wed, 29 Jun 2016 21:45:28 -0400 Subject: Fixed identical background color for LetterAvatar on 32bits platforms --- app/User/Avatar/LetterAvatarProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/User') diff --git a/app/User/Avatar/LetterAvatarProvider.php b/app/User/Avatar/LetterAvatarProvider.php index b7a95f41..727f9109 100644 --- a/app/User/Avatar/LetterAvatarProvider.php +++ b/app/User/Avatar/LetterAvatarProvider.php @@ -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) { -- cgit v1.2.3