From: phpbugs at wayoverthere dot com
Operating system: Linux
PHP version: 5.2CVS-2008-03-13 (snap)
PHP Bug Type: PDO related
Bug description: Extending PDO/MySQL class with a __call() function doesn't
work
Description:
------------
Exact(?) same bug as #43663, except connecting to a MySQL 5 server. I
have also tried a 5.3 snapshot & got the same result. Tried both cgi
and cli.
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
Fatal error: Call to undefined method test::bar() in call.php on
line 24"
--
Edit bug report at http://bugs.php.net/?id=44425&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=44425&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=44425&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=44425&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44425&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=44425&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44425&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44425&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44425&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44425&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44425&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=44425&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=44425&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44425&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44425&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44425&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44425&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44425&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44425&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44425&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44425&r=mysqlcfg