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:
Michal Čihař 2017-06-01 14:33:03 +02:00
parent 3eb07713fe
commit 71c3f9f7c1

View File

@ -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';