diff --git a/core/lib/Drupal/Component/Utility/Random.php b/core/lib/Drupal/Component/Utility/Random.php index 1533e65..2712fba 100644 --- a/core/lib/Drupal/Component/Utility/Random.php +++ b/core/lib/Drupal/Component/Utility/Random.php @@ -59,10 +59,9 @@ class Random { public function string($length = 8, $unique = FALSE, $validator = NULL) { $counter = 0; - // Continue to loop if $unique is TRUE and the string has been generated - // already or if $callable is not null and the validate method returns - // FALSE. To generate a random string this loop must be carried out at least - // once. + // Continue to loop if $unique is TRUE and the generated string is not + // unique or if $validator is a callable that returns FALSE. To generate a + // random string this loop must be carried out at least once. do { if ($counter == static::MAXIMUM_TRIES) { throw new \RuntimeException('Unable to generate a unique random name');