From 1ca279d35347b694a1565dd14cb2ce205390ffe9 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 24 Nov 2013 10:04:46 +0000 Subject: [PATCH] fix for random numbers --- lam/lib/account.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lam/lib/account.inc b/lam/lib/account.inc index 9e6109c3..392f2a54 100644 --- a/lam/lib/account.inc +++ b/lam/lib/account.inc @@ -1111,9 +1111,9 @@ class moduleCache { */ function getRandomNumber() { if (function_exists('openssl_random_pseudo_bytes')) { - return hexdec(bin2hex(openssl_random_pseudo_bytes(5))); + return abs(hexdec(bin2hex(openssl_random_pseudo_bytes(5)))); } - return mt_rand(); + return abs(mt_rand()); } /**