Fix check for phpseclib presence
The check here was reversed compared to other locations. Fixes #13308 Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
parent
3eb07713fe
commit
71c3f9f7c1
@ -4882,7 +4882,7 @@ class Util
|
||||
public static function generateRandom($length)
|
||||
{
|
||||
$result = '';
|
||||
if (! function_exists('openssl_random_pseudo_bytes')) {
|
||||
if (class_exists('phpseclib\\Crypt\\Random')) {
|
||||
$random_func = 'phpseclib\\Crypt\\Random::string';
|
||||
} else {
|
||||
$random_func = 'openssl_random_pseudo_bytes';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user