From 162aed0aedad595331424bce4e5fc12dfaa53897 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Johannes=20Schl=C3=BCter?= Date: Tue, 17 Feb 2009 14:42:26 +0000 Subject: [PATCH] MFH: Fix #46542 Extending PDO class with a __call() function doesn't work as expected --- NEWS | 2 ++ ext/pdo/pdo_dbh.c | 2 +- ext/pdo_sqlite/tests/bug46542.phpt | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 ext/pdo_sqlite/tests/bug46542.phpt diff --git a/NEWS b/NEWS index b013d5d790..07caf34074 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,8 @@ PHP NEWS - Fixed bug #47085 (rename() returns true even if the file in PHAR does not exist). (Greg) - Fixed bug #47031 (Fix constants in DualIterator example). (Etienne) - Fixed bug #46897 (ob_flush() should fail to flush unerasable buffers). (David C.) +- Fixed bug #46542 (Extending PDO class with a __call() function doesn't work + as expected). (Johannes) - Fixed bug #46347 (parse_ini_file() doesn't support * in keys). (Nuno) - Fixed bug #46048 (SimpleXML top-level @attributes not part of iterator). (David C.) - Fixed bug #45432 (PDO: persistent connection leak). (Felipe) diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index c3e68ebad8..8f443b0636 100755 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -1359,7 +1359,7 @@ 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); + fbc = std_object_handlers.get_method(object_pp, method_name, method_len TSRMLS_CC); } } 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 -- 2.50.1