From 1727e589f05ee351fb45a4a94cd5eeba13b5ef7c Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Sun, 2 May 2010 19:00:25 +0200 Subject: fixed bug on x86 systems intval depends on arch (time and long random did not find space in a 32bit-int) because bcmod requires a string it was wrong anyway --- paste/include/generator/ShortGenerator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'paste/include') diff --git a/paste/include/generator/ShortGenerator.php b/paste/include/generator/ShortGenerator.php index 320ff10..fc6c1ad 100644 --- a/paste/include/generator/ShortGenerator.php +++ b/paste/include/generator/ShortGenerator.php @@ -51,7 +51,7 @@ class ShortGenerator extends IdGeneratorEngine $converted = ''; // id source (time + random) - $n = intval(time() . rand(1000, getrandmax())); + $n = time() . rand(1000, getrandmax()); while ($n > 0) { $converted = substr(self::codeset, bcmod($n, $base), 1) . $converted; -- cgit v1.2.3