Browse Source

Appease PHPCS.

mark_story 10 years ago
parent
commit
c20763b253
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/Utility/Security.php

+ 3 - 1
src/Utility/Security.php

@@ -122,8 +122,10 @@ class Security
             E_USER_WARNING
         );
         $bytes = '';
-        while (strlen($bytes) < $length) {
+        $byteLength = 0;
+        while ($byteLength < $length) {
             $bytes .= static::hash(Text::uuid() . uniqid(mt_rand(), true), 'sha512', true);
+            $byteLength = strlen($bytes);
         }
         return substr($bytes, 0, $length);
     }