1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 17:52:16 +01:00

compact() doesnt throw "wrong param count"

This commit is contained in:
Hannes Magnusson
2006-10-03 16:36:57 +00:00
parent d666c05427
commit 0eaea000db

View File

@@ -1567,6 +1567,9 @@ PHP_FUNCTION(compact)
zval ***args; /* function arguments array */
int i;
if (ZEND_NUM_ARGS() < 1) {
WRONG_PARAM_COUNT;
}
args = (zval ***)safe_emalloc(ZEND_NUM_ARGS(), sizeof(zval **), 0);
if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) {