iliaa Sun Oct 5 15:37:03 2003 EDT
Modified files:
/php-src/ext/standard array.c
Log:
Fixed clobbering of the source array, when merging complex
multi-dimensional arrays. Bug reported by Lukas Smith.
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.252 php-src/ext/standard/array.c:1.253
--- php-src/ext/standard/array.c:1.252 Thu Oct 2 18:20:48 2003
+++ php-src/ext/standard/array.c Sun Oct 5 15:37:02 2003
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: array.c,v 1.252 2003/10/02 22:20:48 moriyoshi Exp $ */
+/* $Id: array.c,v 1.253 2003/10/05 19:37:02 iliaa Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -2168,6 +2168,8 @@
return 0;
}
SEPARATE_ZVAL(dest_entry);
+ SEPARATE_ZVAL(src_entry);
+
convert_to_array_ex(dest_entry);
convert_to_array_ex(src_entry);
if (!php_array_merge(Z_ARRVAL_PP(dest_entry),
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php