if (zend_hash_find(dbh->cls_methods[PDO_DBH_DRIVER_METHOD_KIND_DBH],
lc_method_name, method_len+1, (void**)&fbc) == FAILURE) {
- fbc = NULL;
+ if (std_object_handlers.get_method) {
+ fbc = std_object_handlers.get_method(object_pp, lc_method_name, method_len TSRMLS_CC);
+ }
+
+ if (!fbc) {
+ fbc = NULL;
+ }
+
goto out;
}
/* got it */
}
-
+
out:
efree(lc_method_name);
return fbc;
--- /dev/null
+--TEST--
+PDO Common: Bug #43663 (__call on classes derived from PDO)
+--FILE--
+--SKIPIF--
+<?php # vim:ft=php
+if (!extension_loaded('pdo')) die('skip');
+?>
+--FILE--
+<?php
+class test extends PDO{
+ function __call($name, array $args) {
+ echo "Called $name in ".__CLASS__."\n";
+ }
+ function foo() {
+ echo "Called foo in ".__CLASS__."\n";
+ }
+}
+$a = new test('sqlite::memory:');
+$a->foo();
+$a->bar();
+--EXPECT--
+Called foo in test
+Called bar in test