andrei Mon Jul 24 18:18:33 2006 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/standard array.c
Log:
+1 for keys
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.7&r2=1.308.2.21.2.8&diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.308.2.21.2.7
php-src/ext/standard/array.c:1.308.2.21.2.8
--- php-src/ext/standard/array.c:1.308.2.21.2.7 Sat Jul 22 16:58:39 2006
+++ php-src/ext/standard/array.c Mon Jul 24 18:18:33 2006
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: array.c,v 1.308.2.21.2.7 2006/07/22 16:58:39 andrei Exp $ */
+/* $Id: array.c,v 1.308.2.21.2.8 2006/07/24 18:18:33 andrei Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -4551,7 +4551,7 @@
zend_hash_get_current_data_ex(Z_ARRVAL_P(values), (void
**)&entry_values, &pos_values) == SUCCESS) {
if (Z_TYPE_PP(entry_keys) == IS_STRING) {
zval_add_ref(entry_values);
- add_assoc_zval_ex(return_value,
Z_STRVAL_PP(entry_keys), Z_STRLEN_PP(entry_keys), *entry_values);
+ add_assoc_zval_ex(return_value,
Z_STRVAL_PP(entry_keys), Z_STRLEN_PP(entry_keys)+1, *entry_values);
} else if (Z_TYPE_PP(entry_keys) == IS_LONG) {
zval_add_ref(entry_values);
add_index_zval(return_value, Z_LVAL_PP(entry_keys),
*entry_values);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php