From: Johannes Schlüter Date: Tue, 17 Feb 2009 14:39:58 +0000 (+0000) Subject: - Fix #46542 Extending PDO class with a __call() function doesn't work as X-Git-Tag: php-5.4.0alpha1~191^2~4252 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f6f0d58bee72d0fbf96584fc5de0c60670029c9c;p=php - Fix #46542 Extending PDO class with a __call() function doesn't work as expected --- diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index f2e211b20e..ceab49a360 100755 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -1366,7 +1366,7 @@ static union _zend_function *dbh_method_get( out: if (std_object_handlers.get_method) { - fbc = std_object_handlers.get_method(object_pp, lc_method_name, method_len TSRMLS_CC); + fbc = std_object_handlers.get_method(object_pp, method_name, method_len TSRMLS_CC); } pdo_zstr_efree(lc_method_name); diff --git a/ext/pdo_sqlite/tests/bug46542.phpt b/ext/pdo_sqlite/tests/bug46542.phpt new file mode 100644 index 0000000000..e08cc14c1b --- /dev/null +++ b/ext/pdo_sqlite/tests/bug46542.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #46542 Extending PDO class with a __call() function +--SKIPIF-- + +--FILE-- +truc(); +$a->TRUC(); + +?> +--EXPECT-- +A::truc +A::truc