Skip to content

Commit 5ac03f0

Browse files
authored
Merge pull request #8 from there4/php-max-int-safe-mode
Fix strict warning for rand int sizes
2 parents 95389fe + 20f3061 commit 5ac03f0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/AnalyticsEvent.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ public function trackEvent($object, $action, $label = '', $value = 1)
8787
{
8888
$var_utmac = $this->_code;
8989
$var_utmhn = $this->_domain;
90-
$var_utmn = rand(1000000000, 9999999999); //random request number
91-
$var_cookie = rand(10000000, 99999999); //random cookie number
92-
$var_random = rand(1000000000, 2147483647); //number under 2147483647
93-
$var_today = time(); //today
94-
$var_referer = $this->getCurrentUrl(); //referer url
90+
$var_utmn = rand(1000000000, PHP_INT_MAX); //random request number
91+
$var_cookie = rand(10000000, PHP_INT_MAX); //random cookie number
92+
$var_random = rand(1000000000, 2147483647); //number under 2147483647
93+
$var_today = time(); //today
94+
$var_referer = $this->getCurrentUrl(); //referer url
9595
$var_utmp = 'index.php';
9696
$var_uservar = '';
9797

0 commit comments

Comments
 (0)