#23804 [NEW]: passing wrong parameter count to user functions gives no warnings

From: Date: Sun, 25 May 2003 21:59:10 +0000
Subject: #23804 [NEW]: passing wrong parameter count to user functions gives no warnings
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-40397@lists.php.net to get a copy of this message
From: meebey@php.net Operating system: Debian GNU/Linux PHP version: 4.3.1 PHP Bug Type: Scripting Engine problem Bug description: passing wrong parameter count to user functions gives no warnings When I pass 3 parameters to an user PHP function, that needs 2 parameters, I don't get any fatal, warning nor notice.. The function is just called and the 3. parameter ignored... When C PHP Functions are called like mysql_connect() with a wrong parameter count, I will get a E_WARNING. It should be the same with the user functions... ZEND_API void zend_wrong_param_count(TSRMLS_D) does this for the C functions... Also it's the same behaviour on ZendEngine2, no fatal, warning nor notice.. here a simple script to reproduces/test the bug: #!/usr/local/bin/php <?php // to be sure we get all fatal, warnings and notices error_reporting(E_ALL); ini_set("display_errors","1"); // declaring a function which takes _2_ parameters function foo($param1, $param2) { echo "function foo is called, all went fine...\n"; } // calling the function and passing _3_ parameters foo(1, 2, 3); ?> -- Edit bug report at http://bugs.php.net/?id=23804&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=23804&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=23804&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=23804&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=23804&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=23804&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=23804&r=support Expected behavior: http://bugs.php.net/fix.php?id=23804&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=23804&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=23804&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=23804&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23804&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=23804&r=dst IIS Stability: http://bugs.php.net/fix.php?id=23804&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=23804&r=gnused

« previous php.bugs (#40397) next »