]> granicus.if.org Git - php/commitdiff
Fix #48224 (Remove incorrect shuffle)
authorEtienne Kneuss <colder@php.net>
Sun, 10 May 2009 16:45:01 +0000 (16:45 +0000)
committerEtienne Kneuss <colder@php.net>
Sun, 10 May 2009 16:45:01 +0000 (16:45 +0000)
NEWS
ext/standard/array.c

diff --git a/NEWS b/NEWS
index 18140edfb296ba5a4551ad31de3831ebb37625f8..f6ff028a0a49d1447089ba4911ddcc0dd5ef03e9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,7 @@ PHP                                                                        NEWS
 - Fixed segfault on invalid session.save_path. (Hannes)
 - Fixed leaks in imap when a mail_criteria is used. (Pierre)
 
+- Fixed bug #48224 (Incorrect shuffle in array_rand). (Etienne)
 - Fixed bug #48221 (memory leak when passing invalid xslt parameter). (Felipe)
 - Fixed bug #48206 (Iterating over an invalid data structure
   with RecursiveIteratorIterator leads to a segfault). (Scott)
index 4ed84a267b5468969a32d2dc40c64fdabdfce4c2..2c926f8c392868c7b25755b4e526656d9453d75b 100644 (file)
@@ -4204,10 +4204,6 @@ PHP_FUNCTION(array_rand)
                num_avail--;
                zend_hash_move_forward_ex(Z_ARRVAL_PP(input), &pos);
        }
-
-       if (num_req_val == num_avail) {
-               array_data_shuffle(return_value TSRMLS_CC);
-       }
 }
 /* }}} */