dmitry Wed Aug 10 04:22:02 2005 EDT
Added files: (Branch: PHP_5_1)
/php-src/ext/standard/tests/array bug33940.phpt
Modified files:
/php-src NEWS
/php-src/ext/standard array.c
Log:
Fixed bug #33940 (array_map() fails to pass by reference when called
recursively)
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.5&r2=1.2027.2.6&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.5 php-src/NEWS:1.2027.2.6
--- php-src/NEWS:1.2027.2.5 Wed Aug 10 03:42:48 2005
+++ php-src/NEWS Wed Aug 10 04:21:49 2005
@@ -19,6 +19,8 @@
(Jani)
- Fixed bug #33958 (duplicate cookies and magic_quotes=off may cause a crash).
(Ilia)
+- Fixed bug #33940 (array_map() fails to pass by reference when called
+ recursively). (Dmitry)
- Fixed bug #33917 (number_format() output with > 1 char separators). (Jani)
- Fixed bug #33904 (input array keys being escaped when magic quotes is off).
(Ilia)
http://cvs.php.net/diff.php/php-src/ext/standard/array.c?r1=1.308.2.1&r2=1.308.2.2&ty=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.308.2.1
php-src/ext/standard/array.c:1.308.2.2
--- php-src/ext/standard/array.c:1.308.2.1 Wed Aug 10 03:43:06 2005
+++ php-src/ext/standard/array.c Wed Aug 10 04:22:00 2005
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: array.c,v 1.308.2.1 2005/08/10 07:43:06 dmitry Exp $ */
+/* $Id: array.c,v 1.308.2.2 2005/08/10 08:22:00 dmitry Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -4252,6 +4252,7 @@
efree(array_pos);
return;
}
+ SEPARATE_ZVAL_IF_NOT_REF(pargs[i]);
args[i] = *pargs[i];
array_len[i] = zend_hash_num_elements(Z_ARRVAL_PP(pargs[i]));
if (array_len[i] > maxlen) {
http://cvs.php.net/co.php/php-src/ext/standard/tests/array/bug33940.phpt?r=1.1&p=1
Index: php-src/ext/standard/tests/array/bug33940.phpt
+++ php-src/ext/standard/tests/array/bug33940.phpt
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php