ID:               46542
 Updated by:       [EMAIL PROTECTED]
 Reported By:      myardbenoit at gmail dot com
-Status:           Open
+Status:           Assigned
 Bug Type:         PDO related
 Operating System: GNU/Linux
 PHP Version:      5.2.6
-Assigned To:      
+Assigned To:      johannes
 New Comment:

Thanks for the report, I could verify it and have a fix quite ready ..
just testing it.

Yes, __call and PDO is a bit weird in some situations: in current PHP
versions there's a bug that a __call() method is not called if a driver
has no own methods (like PDO_mysql) but that bug is fixed in CVS for
some time.


Previous Comments:
------------------------------------------------------------------------

[2008-11-11 10:23:16] myardbenoit at gmail dot com

Description:
------------
A user-defined class extending PDO will have troubles with __call():
the method name passed to __call() is always lowercase.

As far as I can tell, it only happens when extending PDO.

As a side-note, I have seen several issues with __call() and PDO.. is
there anything special about PDO which could explain that ?

Reproduce code:
---------------
class A extends PDO
{ function __call($m, $p) {print __CLASS__."::$m\n";} }

class B extends XSLTProcessor
{ function __call($m, $p) {print __CLASS__."::$m\n";} }

$a = new A('sqlite:dummy.db');

$a->truc();
$a->TRUC();

$b = new B();

$b->truc();
$b->TRUC();

Expected result:
----------------
A::truc
A::TRUC <-----------
B::truc
B::TRUC

Actual result:
--------------
A::truc
A::truc <-----------
B::truc
B::TRUC


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=46542&edit=1

Reply via email to