mirror of
https://github.com/danog/phpseclib.git
synced 2025-01-22 21:12:26 +01:00
Random: fix fallback on PHP 8.1+
This commit is contained in:
parent
51cafda4a3
commit
c4ec1ea069
@ -159,7 +159,10 @@ if (!function_exists('crypt_random_string')) {
|
|||||||
(isset($_POST) ? phpseclib_safe_serialize($_POST) : '') .
|
(isset($_POST) ? phpseclib_safe_serialize($_POST) : '') .
|
||||||
(isset($_GET) ? phpseclib_safe_serialize($_GET) : '') .
|
(isset($_GET) ? phpseclib_safe_serialize($_GET) : '') .
|
||||||
(isset($_COOKIE) ? phpseclib_safe_serialize($_COOKIE) : '') .
|
(isset($_COOKIE) ? phpseclib_safe_serialize($_COOKIE) : '') .
|
||||||
phpseclib_safe_serialize($GLOBALS) .
|
// as of PHP 8.1 $GLOBALS cann't be accessed by reference, which eliminates
|
||||||
|
// the need for phpseclib_safe_serialize. see https://wiki.php.net/rfc/restrict_globals_usage
|
||||||
|
// for more info
|
||||||
|
(version_compare(PHP_VERSION, '8.1.0', '>=') ? serialize($GLOBALS) : phpseclib_safe_serialize($GLOBALS)) .
|
||||||
phpseclib_safe_serialize($_SESSION) .
|
phpseclib_safe_serialize($_SESSION) .
|
||||||
phpseclib_safe_serialize($_OLD_SESSION)
|
phpseclib_safe_serialize($_OLD_SESSION)
|
||||||
));
|
));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user