From: Roland Häder Date: Wed, 7 Nov 2012 17:03:50 +0000 (+0000) Subject: shall not have less than 10 entries X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=34200254d76999df3ed2ced0f49758285bc82e7e;p=mailer.git shall not have less than 10 entries --- diff --git a/inc/functions.php b/inc/functions.php index b6083824ef..c72f7eb7f6 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -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) { diff --git a/inc/install-inc.php b/inc/install-inc.php index 7a82068c1d..1e00d24106 100644 --- a/inc/install-inc.php +++ b/inc/install-inc.php @@ -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();