]> granicus.if.org Git - php/commitdiff
- Fixed bug #26381 (rand() without srand() doesn't work with certain php.ini)
authorfoobar <sniper@php.net>
Mon, 19 Jan 2004 19:07:08 +0000 (19:07 +0000)
committerfoobar <sniper@php.net>
Mon, 19 Jan 2004 19:07:08 +0000 (19:07 +0000)
# This was no prob in PHP5, some memory corruption / leaks, whatever fixed
# in ZE2 but not in ZE1?

NEWS
ext/standard/basic_functions.c

diff --git a/NEWS b/NEWS
index 1312e775f58ba4e3e59f05462479d2f1352acdf9..ce46db15bae6afde5702b7bd688cc46504713fe6 100644 (file)
--- 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
index c5fe60149e1c1ec159fc2590b370609516d1d38c..96ea2679f027e875017ef909545671b6fafcda8a 100644 (file)
@@ -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;