Looks like a good fix to me. I'd just change the error message to "Cannot redeclare method %s()" The patch can go into Engine 1 and 2.
Andi At 20:10 25/03/2002 +0100, Derick Rethans wrote: >Hello, > >the attched patch fixes this for me, but I'm sure it will impact a lot of >other things. Andi, can you shed some light on it? > >Derick > >On 25 Mar 2002 [EMAIL PROTECTED] wrote: > > > From: [EMAIL PROTECTED] > > Operating system: Linux > > PHP version: 4.1.2 > > PHP Bug Type: Scripting Engine problem > > Bug description: Multiply-defined functions in classes not reported > > > > PHP does not report multiply-defined errors for class member functions. For > > example, the following script below, when executed, only outputs "two", > > with no errors. > > > > Instead, PHP should be giving error messages since the function bar has > > been defined multiple times. > > > > <? > > class foo > > { > > function bar() {echo "one\n";} > > function bar() {echo "two\n";} > > } > > > > $f = new foo(); > > $f->bar(); > > -- > > Edit bug report at http://bugs.php.net/?id=16265&edit=1 > > -- > > Fixed in CVS: http://bugs.php.net/fix.php?id=16265&r=fixedcvs > > Fixed in release: http://bugs.php.net/fix.php?id=16265&r=alreadyfixed > > Need backtrace: http://bugs.php.net/fix.php?id=16265&r=needtrace > > Try newer version: http://bugs.php.net/fix.php?id=16265&r=oldversion > > Not developer issue: http://bugs.php.net/fix.php?id=16265&r=support > > Expected behavior: http://bugs.php.net/fix.php?id=16265&r=notwrong > > Not enough info: http://bugs.php.net/fix.php?id=16265&r=notenoughinfo > > Submitted twice: http://bugs.php.net/fix.php?id=16265&r=submittedtwice > > -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php