From 08025c134ddbac3cf9ecafd1ecf2b31d82c97b4f Mon Sep 17 00:00:00 2001 From: Cameron Eagans Date: Tue, 1 Sep 2015 14:53:45 -0400 Subject: [PATCH] Remove string assignment --- phpseclib/Crypt/Random.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/phpseclib/Crypt/Random.php b/phpseclib/Crypt/Random.php index 0c053d76..ef6c6e3f 100644 --- a/phpseclib/Crypt/Random.php +++ b/phpseclib/Crypt/Random.php @@ -55,8 +55,7 @@ class Random { if (version_compare(PHP_VERSION, '7.0.0', '>=')) { try { - $string = random_bytes($length); - return $string; + return random_bytes($length); } catch (\EngineException $e) { // If a sufficient source of randomness is unavailable, random_bytes() will emit a warning.