Skip to content

Commit

Permalink
Compatible low version PHP
Browse files Browse the repository at this point in the history
  • Loading branch information
walkor authored May 23, 2018
1 parent 9dcbee3 commit d7470cf
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Protocols/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,13 +348,12 @@ public static function setcookie(
/**
* sessionCreateId
*
* @param string|prefix $prefix
*
* @return string
*/
public static function sessionCreateId($prefix = null)
public static function sessionCreateId()
{
return session_create_id($prefix);
mt_srand();
return bin2hex(pack('d', microtime(true)) . pack('N',mt_rand(0, 2147483647)));
}

/**
Expand Down

0 comments on commit d7470cf

Please sign in to comment.