summaryrefslogtreecommitdiff
path: root/ext/standard/array.c
diff options
context:
space:
mode:
authorAndrei Zmievski <andrei@php.net>2006-07-21 23:54:19 +0000
committerAndrei Zmievski <andrei@php.net>2006-07-21 23:54:19 +0000
commit1223119155dfc587ea1913456394945e0b5ba595 (patch)
tree3edb6bb47dedf5dbb5f57d3007bba4c5ce11b7b5 /ext/standard/array.c
parenta6f8252f9b5deef3b78c0635e10e693739312b56 (diff)
downloadphp-git-1223119155dfc587ea1913456394945e0b5ba595.tar.gz
MFH
Diffstat (limited to 'ext/standard/array.c')
-rw-r--r--ext/standard/array.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c
index 33c4c50d3d..b7c750b0f7 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -4522,7 +4522,7 @@ PHP_FUNCTION(array_chunk)
/* }}} */
/* {{{ 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 @@ PHP_FUNCTION(array_combine)
}
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 @@ PHP_FUNCTION(array_combine)
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);
}