From efc25266007bd364ab44e13adcedc4fbafce4675 Mon Sep 17 00:00:00 2001 From: mark_story Date: Tue, 3 May 2016 17:46:29 -0400 Subject: [PATCH] Appease PHPCS. --- lib/Cake/Utility/Security.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Cake/Utility/Security.php b/lib/Cake/Utility/Security.php index 464d05f71..be128e64a 100644 --- a/lib/Cake/Utility/Security.php +++ b/lib/Cake/Utility/Security.php @@ -191,8 +191,10 @@ class Security { E_USER_WARNING ); $bytes = ''; - while (strlen($bytes) < $length) { + $byteLength = 0; + while ($byteLength < $length) { $bytes .= static::hash(CakeText::uuid() . uniqid(mt_rand(), true), 'sha512', true); + $byteLength = strlen($bytes); } return substr($bytes, 0, $length); }