#47840 [Fbk->Bgs]: __call ignored when extending PDO

[email protected]
Newsgroups php.bugs
Message-ID <[email protected]>
 ID:               47840
 Updated by:       [email protected]
 Reported By:      oorza2k5 at gmail dot com
-Status:           Feedback
+Status:           Bogus
 Bug Type:         PDO related
 Operating System: Linux
 PHP Version:      5.2.9
 New Comment:

It's works. It was fixed days ago. (bug#47769)

Thanks.


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

[2009-03-30 17:30:53] oorza2k5 at gmail dot com

It works as expected in the latest CVS under Windows... I don't have a
non-production Linux install to test with, so if someone else could
verify it's fixed in CVS (under Linux), that'd be great.

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

[2009-03-30 16:48:36] [email protected]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/



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

[2009-03-30 16:45:08] oorza2k5 at gmail dot com

Description:
------------
Exact same issue (that was supposedly resolved) as #44425, but now with
a MySQL 5.1 database.

__call() doesn't do anything when extending PDO.

This bug is clearly not fixed.

Reproduce code:
---------------
Reproduce code:
---------------
<?php
class test extends PDO {
    function __call($name, array $args) {
        echo "Called $name in ".__CLASS__.'<br>';
    }
    function foo() {
        echo "Called foo in ".__CLASS__.'<br>';
    }
}
$a = new test('mysql:dbname=test;host=localhost','user','pw');
$a->foo();
$a->bar();
?>

Expected result:
----------------
"Called foo in test
Called bar in test"


Actual result:
--------------
Called foo in test<br>
Fatal error: Call to undefined method test::bar() in test4.php on line
12


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


-- 
Edit this bug report at http://bugs.php.net/?id=47840&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.