andrei Fri Jul 21 23:54:19 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard array.c Log: MFH http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.4&r2=1.308.2.21.2.5&diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.308.2.21.2.4 php-src/ext/standard/array.c:1.308.2.21.2.5 --- php-src/ext/standard/array.c:1.308.2.21.2.4 Sat Jul 15 12:14:07 2006 +++ php-src/ext/standard/array.c Fri Jul 21 23:54:19 2006 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: array.c,v 1.308.2.21.2.4 2006/07/15 12:14:07 helly Exp $ */ +/* $Id: array.c,v 1.308.2.21.2.5 2006/07/21 23:54:19 andrei Exp $ */ #include "php.h" #include "php_ini.h" @@ -4522,7 +4522,7 @@ /* }}} */ /* {{{ proto array array_combine(array keys, array values) - Creates an array by using the elements of the first parameter as keys and the elements of the second as correspoding keys */ + Creates an array by using the elements of the first parameter as keys and the elements of the second as corresponding keys */ PHP_FUNCTION(array_combine) { zval *values, *keys; @@ -4534,7 +4534,7 @@ } if (zend_hash_num_elements(Z_ARRVAL_P(keys)) != zend_hash_num_elements(Z_ARRVAL_P(values))) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Both parameters should have equal number of elements"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Both parameters should have an equal number of elements"); RETURN_FALSE; } @@ -4563,7 +4563,7 @@ convert_to_string(&key); zval_add_ref(entry_values); - add_assoc_zval(return_value, Z_STRVAL(key), *entry_values); + add_assoc_zval_ex(return_value, Z_STRVAL(key), Z_STRLEN(key)+1, *entry_values); zval_dtor(&key); }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php