#47840 [Opn->Fbk]: __call ignored when extending PDO
| From: | felipe@php.net | Date: | Mon, 30 Mar 2009 16:48:36 +0000 |
| Subject: | #47840 [Opn->Fbk]: __call ignored when extending PDO | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-135330@lists.php.net to get a copy of this message | ||
ID: 47840
Updated by: felipe@php.net
Reported By: oorza2k5 at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: PDO related
Operating System: Linux
PHP Version: 5.2.9
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Previous Comments:
------------------------------------------------------------------------
[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