ID: 43512
Updated by: [EMAIL PROTECTED]
Reported By: alkoholex at gmail dot com
Status: Open
Bug Type: Scripting Engine problem
Operating System: Linux Debian 4.0
PHP Version: 5.2.5, 5.3CVS, 6CVS
New Comment:
Good catch. I can reproduce this with any current CVS/released
versions.
Previous Comments:
------------------------------------------------------------------------
[2007-12-06 09:08:44] alkoholex at gmail dot com
Description:
------------
The PHP-Parser doesn't recognise if a parameter with the same name is
given over two times (no warning / error). In this case it was a
copy-paste mistake, but it causes big troubles in our system.
Reproduce code:
---------------
class myCls extends otherCls {
private function myFunc($var, $var) {
//do something
}
}
Expected result:
----------------
A Warning should occur. Something like "Multible use of
variable/parameter name in function myFunc".
Actual result:
--------------
Nothing. The second parameter replaces the value of the first.
If you don't give over an second parameter, the value of the first is
nonsence or empty.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43512&edit=1