dmitry Wed Aug 10 04:23:54 2005 EDT
Added files: (Branch: PHP_5_0)
/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.1760.2.459&r2=1.1760.2.460&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1760.2.459 php-src/NEWS:1.1760.2.460
--- php-src/NEWS:1.1760.2.459 Wed Aug 10 03:43:39 2005
+++ php-src/NEWS Wed Aug 10 04:23:51 2005
@@ -20,6 +20,8 @@
- Fixed memory corruption in stristr(). (Derick)
- Fixed segfaults when CURL callback functions throw exception. (Tony)
- 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 #33853 (php:function call __autoload with lowercase param).
(Marcus)
- Fixed bug #33802 (throw Exception in error handler causes crash). (Dmitry)
- Fixed bug #33723 (php_value overrides php_admin_value). (Dmitry)
http://cvs.php.net/diff.php/php-src/ext/standard/array.c?r1=1.266.2.22&r2=1.266.2.23&ty=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.266.2.22
php-src/ext/standard/array.c:1.266.2.23
--- php-src/ext/standard/array.c:1.266.2.22 Wed Aug 10 03:43:39 2005
+++ php-src/ext/standard/array.c Wed Aug 10 04:23:52 2005
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: array.c,v 1.266.2.22 2005/08/10 07:43:39 dmitry Exp $ */
+/* $Id: array.c,v 1.266.2.23 2005/08/10 08:23:52 dmitry Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -4090,6 +4090,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