mirror of
https://github.com/php/php-src.git
synced 2026-04-21 15:08:16 +02:00
MFH: Fix #46542 Extending PDO class with a __call() function doesn't work
as expected
This commit is contained in:
+1
-1
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user