diff options
author | George Peter Banyard <girgias@php.net> | 2019-08-21 02:18:00 +0200 |
---|---|---|
committer | George Peter Banyard <girgias@php.net> | 2019-08-21 18:12:56 +0200 |
commit | 7d4e3dc32d5bcf386f53607b3190e9a856844ad1 (patch) | |
tree | c0a2f67079f7a3c6972faa2c1682eee32e22d4ea /ext/standard/array.c | |
parent | eaf66df51748beb3df5c2431262ebaa76578ebf1 (diff) | |
download | php-git-7d4e3dc32d5bcf386f53607b3190e9a856844ad1.tar.gz |
Promote warnings to errors in array_combine()
Diffstat (limited to 'ext/standard/array.c')
-rw-r--r-- | ext/standard/array.c | 6 |
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) { |