summaryrefslogtreecommitdiff
path: root/ext/standard/array.c
diff options
context:
space:
mode:
authorGeorge Peter Banyard <girgias@php.net>2019-08-21 02:18:00 +0200
committerGeorge Peter Banyard <girgias@php.net>2019-08-21 18:12:56 +0200
commit7d4e3dc32d5bcf386f53607b3190e9a856844ad1 (patch)
treec0a2f67079f7a3c6972faa2c1682eee32e22d4ea /ext/standard/array.c
parenteaf66df51748beb3df5c2431262ebaa76578ebf1 (diff)
downloadphp-git-7d4e3dc32d5bcf386f53607b3190e9a856844ad1.tar.gz
Promote warnings to errors in array_combine()
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 aca24a435f..164b7da046 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -6403,7 +6403,7 @@ PHP_FUNCTION(array_chunk)
}
/* }}} */
-/* {{{ proto array|false array_combine(array keys, array values)
+/* {{{ 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 the corresponding values */
PHP_FUNCTION(array_combine)
{
@@ -6421,8 +6421,8 @@ PHP_FUNCTION(array_combine)
num_values = zend_hash_num_elements(values);
if (num_keys != num_values) {
- php_error_docref(NULL, E_WARNING, "Both parameters should have an equal number of elements");
- RETURN_FALSE;
+ zend_throw_error(NULL, "Both parameters should have an equal number of elements");
+ return;
}
if (!num_keys) {