ID:               34590
 Updated by:       [EMAIL PROTECTED]
 Reported By:      php dot net at benjamin dot schulz dot name
-Status:           Open
+Status:           Assigned
 Bug Type:         PDO related
 Operating System: linux
 PHP Version:      5CVS-2005-09-21 (CVS)
-Assigned To:      
+Assigned To:      helly
 New Comment:

Marcus, fix.



Previous Comments:
------------------------------------------------------------------------

[2005-09-21 22:45:57] christian dot mueller at dfpx dot de

Duplicate of http://bugs.php.net/bug.php?id=34235

But this on has an much tighter reproduce code.

------------------------------------------------------------------------

[2005-09-21 22:15:04] php dot net at benjamin dot schulz dot name

Description:
------------
When using PDO::ATTR_STATEMENT_CLASS the statement object is an object
of the user defined class but it's not possible to access it's
(non-pdo) methods

Reproduce code:
---------------
<?php
$pdo = new PDO("pgsql:user=zrm dbname=zrm host=localhost");

class myStatement extends PDOStatement
{
        function foo()
        {
                echo __METHOD__;
        }
}

$opts = array();
$opts[PDO::ATTR_STATEMENT_CLASS] = array('myStatement');
$r = $pdo->prepare('SELECT login_id FROM logins', $opts);
var_dump($r->foo());
?>

Expected result:
----------------
myStatement::foo()

Actual result:
--------------
Fatal error: Call to undefined method myStatement::foo() 


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=34590&edit=1

Reply via email to