summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xext/pdo/pdo_dbh.c9
-rw-r--r--ext/pdo_mysql/tests/pdo_mysql_subclass.phpt4
2 files changed, 7 insertions, 6 deletions
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c
index 48327beb37..5113430ded 100755
--- a/ext/pdo/pdo_dbh.c
+++ b/ext/pdo/pdo_dbh.c
@@ -1293,9 +1293,6 @@ static union _zend_function *dbh_method_get(
if (zend_hash_find(dbh->cls_methods[PDO_DBH_DRIVER_METHOD_KIND_DBH],
lc_method_name, method_len+1, (void**)&fbc) == FAILURE) {
- 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;
@@ -1307,6 +1304,12 @@ static union _zend_function *dbh_method_get(
}
out:
+ if (!fbc) {
+ if (std_object_handlers.get_method) {
+ fbc = std_object_handlers.get_method(object_pp, lc_method_name, method_len TSRMLS_CC);
+ }
+ }
+
efree(lc_method_name);
return fbc;
}
diff --git a/ext/pdo_mysql/tests/pdo_mysql_subclass.phpt b/ext/pdo_mysql/tests/pdo_mysql_subclass.phpt
index 90d4fb25ba..ab21f8cdd4 100644
--- a/ext/pdo_mysql/tests/pdo_mysql_subclass.phpt
+++ b/ext/pdo_mysql/tests/pdo_mysql_subclass.phpt
@@ -36,7 +36,7 @@ if (version_compare(PHP_VERSION, '5.0.0', '<'))
}
public function __call($method, $args) {
- print "__call()";
+ print "__call(".var_export($method,true).", ".var_export($args, true).")\n";
// $this->protocol();
}
@@ -74,8 +74,6 @@ if (version_compare(PHP_VERSION, '5.0.0', '<'))
$db->exec('DROP TABLE IF EXISTS test');
print "done!\n";
?>
---XFAIL--
-PDO doesn't like __call()
--EXPECTF--
__construct('%s', '%s', '%s')
exec('DROP TABLE IF EXISTS test')