dmitry Wed Aug 10 04:24:13 2005 EDT
Added files: (Branch: PHP_4_4)
/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.1247.2.920.2.21&r2=1.1247.2.920.2.22&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.920.2.21 php-src/NEWS:1.1247.2.920.2.22
--- php-src/NEWS:1.1247.2.920.2.21 Wed Aug 10 03:44:07 2005
+++ php-src/NEWS Wed Aug 10 04:24:10 2005
@@ -2,6 +2,8 @@
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2005, Version 4.4.1
- Fixed bug #33989 (extract($GLOBALS,EXTR_REFS) crashes PHP). (Dmitry)
+- Fixed bug #33940 (array_map() fails to pass by reference when called
+ recursively). (Dmitry)
- Fixed bug #33690 (Crash setting some ini directives in httpd.conf). (Rasmus)
- Fixed bug #33673 (Added detection for partially uploaded files). (Ilia)
- Fixed bug #33648 (Using --with-regex=system causes compile failure). (Andrei)
http://cvs.php.net/diff.php/php-src/ext/standard/array.c?r1=1.199.2.44.2.5&r2=1.199.2.44.2.6&ty=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.199.2.44.2.5
php-src/ext/standard/array.c:1.199.2.44.2.6
--- php-src/ext/standard/array.c:1.199.2.44.2.5 Wed Aug 10 03:44:09 2005
+++ php-src/ext/standard/array.c Wed Aug 10 04:24:12 2005
@@ -22,7 +22,7 @@
*/
-/* $Id: array.c,v 1.199.2.44.2.5 2005/08/10 07:44:09 dmitry Exp $ */
+/* $Id: array.c,v 1.199.2.44.2.6 2005/08/10 08:24:12 dmitry Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -3436,6 +3436,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