bjori Tue Oct 3 16:36:57 2006 UTC Modified files: /php-src/ext/standard array.c Log: compact() doesnt throw "wrong param count" http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.386&r2=1.387&diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.386 php-src/ext/standard/array.c:1.387 --- php-src/ext/standard/array.c:1.386 Wed Sep 20 20:30:19 2006 +++ php-src/ext/standard/array.c Tue Oct 3 16:36:57 2006 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: array.c,v 1.386 2006/09/20 20:30:19 andrei Exp $ */ +/* $Id: array.c,v 1.387 2006/10/03 16:36:57 bjori Exp $ */ #include "php.h" #include "php_ini.h" @@ -1567,6 +1567,9 @@ 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) {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php