]> git.mxchange.org Git - mailer.git/commitdiff
shall not have less than 10 entries
authorRoland Häder <roland@mxchange.org>
Wed, 7 Nov 2012 17:03:50 +0000 (17:03 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 7 Nov 2012 17:03:50 +0000 (17:03 +0000)
inc/functions.php
inc/install-inc.php

index b6083824ef45981a8d8d594c5bd3b9a03a6832f1..c72f7eb7f65de7009edeb2cfd41a98b544e8eb43 100644 (file)
@@ -92,6 +92,9 @@ function generatePassword ($length = '0', $exclude =  array()) {
        // Exclude some entries
        $localAbc = array_diff($GLOBALS['_abc'], $exclude);
 
+       // $localAbc must have at least 10 entries
+       assert(count($localAbc) >= 10);
+
        // Start creating password
        $password = '';
        while (strlen($password) < $length) {
index 7a82068c1d2decd918f7208eeb3ae822b8163e05..1e00d24106bfda972a3380fb0a3ae5fc5b64b7dc 100644 (file)
@@ -46,8 +46,10 @@ loadExtension('timezone', 'test');
 // Set config entry
 setConfigEntry('timezone', 'Europe/Berlin');
 
-// And init timezone
+// Init some things
 FILTER_INIT_TIMEZONE(array());
+FILTER_INIT_RANDOMIZER();
+FILTER_INIT_RANDOM_NUMBER();
 
 // Init variables
 $GLOBALS['install_mysql'] = array();