diff --git a/lib/RandomLib/Generator.php b/lib/RandomLib/Generator.php index 85e975c..8a19860 100644 --- a/lib/RandomLib/Generator.php +++ b/lib/RandomLib/Generator.php @@ -146,7 +146,7 @@ public function generateInt($min = 0, $max = PHP_INT_MAX) { * @return string The generated random string */ public function generateString($length, $characters = '') { - if ($length == 0 || strlen($characters) == 1) { + if ($length == 0 || strlen($characters) == 0) { return ''; } elseif (empty($characters)) { // Default to base 64