summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rwxr-xr-xext/pdo/pdo_dbh.c2
-rw-r--r--ext/pdo_sqlite/tests/bug46542.phpt20
2 files changed, 21 insertions, 1 deletions
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--
+<?php # vim:ft=php
+if (!extension_loaded('pdo_sqlite')) print 'skip not loaded';
+?>
+--FILE--
+<?php
+class A extends PDO
+{ function __call($m, $p) {print __CLASS__."::$m\n";} }
+
+$a = new A('sqlite:dummy.db');
+
+$a->truc();
+$a->TRUC();
+
+?>
+--EXPECT--
+A::truc
+A::truc