johannes                Tue Feb 17 14:39:58 2009 UTC

  Added files:                 
    /php-src/ext/pdo_sqlite/tests       bug46542.phpt 

  Modified files:              
    /php-src/ext/pdo    pdo_dbh.c 
  Log:
  - Fix #46542 Extending PDO class with a __call() function doesn't work as
    expected
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_dbh.c?r1=1.161&r2=1.162&diff_format=u
Index: php-src/ext/pdo/pdo_dbh.c
diff -u php-src/ext/pdo/pdo_dbh.c:1.161 php-src/ext/pdo/pdo_dbh.c:1.162
--- php-src/ext/pdo/pdo_dbh.c:1.161     Fri Feb 13 12:54:20 2009
+++ php-src/ext/pdo/pdo_dbh.c   Tue Feb 17 14:39:58 2009
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: pdo_dbh.c,v 1.161 2009/02/13 12:54:20 felipe Exp $ */
+/* $Id: pdo_dbh.c,v 1.162 2009/02/17 14:39:58 johannes Exp $ */
 
 /* The PDO Database Handle Class */
 
@@ -1366,7 +1366,7 @@
 
 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);

http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/tests/bug46542.phpt?view=markup&rev=1.1
Index: php-src/ext/pdo_sqlite/tests/bug46542.phpt
+++ php-src/ext/pdo_sqlite/tests/bug46542.phpt
--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



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to