bjori           Tue Oct  3 16:37:51 2006 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/standard       array.c 
  Log:
  MFH: compact() doesnt throw "wrong param count"
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.12&r2=1.308.2.21.2.13&diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.308.2.21.2.12 
php-src/ext/standard/array.c:1.308.2.21.2.13
--- php-src/ext/standard/array.c:1.308.2.21.2.12        Tue Sep 19 09:35:27 2006
+++ php-src/ext/standard/array.c        Tue Oct  3 16:37:51 2006
@@ -21,7 +21,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: array.c,v 1.308.2.21.2.12 2006/09/19 09:35:27 tony2001 Exp $ */
+/* $Id: array.c,v 1.308.2.21.2.13 2006/10/03 16:37:51 bjori Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -1507,6 +1507,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

Reply via email to