From: foobar Date: Mon, 19 Jan 2004 19:07:08 +0000 (+0000) Subject: - Fixed bug #26381 (rand() without srand() doesn't work with certain php.ini) X-Git-Tag: php-4.3.5RC2~61 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e902399d153b75e4306ae5bcbb6364648d975968;p=php - Fixed bug #26381 (rand() without srand() doesn't work with certain php.ini) # This was no prob in PHP5, some memory corruption / leaks, whatever fixed # in ZE2 but not in ZE1? --- diff --git a/NEWS b/NEWS index 1312e775f5..ce46db15ba 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,8 @@ PHP 4 NEWS - Fixed bug #26896 (ext/ftp does not work as shared extension). (Jani) - Fixed bug #26772, #26967 (file operations return NULL instead of FALSE). (Wez, Ilia) +- Fixed bug #26381 (rand() without srand() doesn't work with certain php.ini). + (Jani) - Fixed bug #21513 (shutdown functions not executed if timed out). (Zeev) 12 Jan 2004, Version 4.3.5RC1 diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index c5fe60149e..96ea2679f0 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -970,6 +970,9 @@ static void php_putenv_destructor(putenv_entry *pe) static void basic_globals_ctor(php_basic_globals *basic_globals_p TSRMLS_DC) { + BG(rand_is_seeded) = 0; + BG(mt_rand_is_seeded) = 0; + BG(next) = NULL; BG(left) = -1; BG(user_tick_functions) = NULL;