tony2001                Wed Nov 22 10:42:42 2006 UTC

  Added files:                 (Branch: PHP_5_2)
    /php-src/ext/standard/tests/array   bug39576.phpt 

  Modified files:              
    /php-src/ext/standard       array.c 
    /php-src    NEWS 
  Log:
  MFH: fix #39576 (array_walk() doesn't separate userdata zval)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.18&r2=1.308.2.21.2.19&diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.308.2.21.2.18 
php-src/ext/standard/array.c:1.308.2.21.2.19
--- php-src/ext/standard/array.c:1.308.2.21.2.18        Wed Nov 15 22:10:19 2006
+++ php-src/ext/standard/array.c        Wed Nov 22 10:42:41 2006
@@ -21,7 +21,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: array.c,v 1.308.2.21.2.18 2006/11/15 22:10:19 tony2001 Exp $ */
+/* $Id: array.c,v 1.308.2.21.2.19 2006/11/22 10:42:41 tony2001 Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -1138,7 +1138,7 @@
        HashTable *target_hash;
 
        old_walk_func_name = BG(array_walk_func_name);
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz|z", &array, 
&tmp, &userdata) == FAILURE) {
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz/|z/", &array, 
&tmp, &userdata) == FAILURE) {
                return;
        }
        target_hash = HASH_OF(array);
@@ -1169,7 +1169,7 @@
        HashTable *target_hash;
 
        old_walk_func_name = BG(array_walk_func_name);
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz|z", &array, 
&tmp, &userdata) == FAILURE) {
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz/|z/", &array, 
&tmp, &userdata) == FAILURE) {
                return;
        }
        target_hash = HASH_OF(array);
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.368&r2=1.2027.2.547.2.369&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.368 php-src/NEWS:1.2027.2.547.2.369
--- php-src/NEWS:1.2027.2.547.2.368     Sun Nov 19 18:20:48 2006
+++ php-src/NEWS        Wed Nov 22 10:42:41 2006
@@ -41,6 +41,7 @@
     php_filter.h).
 - Fixed wrong signature initialization in imagepng (Takeshi Abe)
 - Added optimization for imageline with horizontal and vertial lines (Pierre)
+- Fixed bug #39576 (array_walk() doesn't separate userdata zval). (Tony)
 - Fixed bug #39454 (Returning a SOAP array segfaults PHP). (Dmitry)
 - Fixed bug #39445 (Calling debug_backtrace() in the __toString() function
   produces a crash). (Dmitry)

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/bug39576.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/bug39576.phpt
+++ php-src/ext/standard/tests/array/bug39576.phpt

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to