|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57435 Unable to add driver specific methods to PDOStatement
Submitted: 2006-12-16 22:05 UTC Modified: 2008-10-24 18:01 UTC
From: cjbj at hotmail dot com Assigned: felipe (profile)
Status: Closed Package: PDO (PECL)
PHP Version: 5_2 CVS-2006-12-16 OS: n/a
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
10 - 3 = ?
Subscribe to this entry?

 [2006-12-16 22:05 UTC] cjbj at hotmail dot com
In pdo_hash_methods(), a constant for DBH is passed to get_driver_methods().  This prevents new methods being added to PDOStatement.

Reproduce code:
Possible patch:

--- c:/tmp/pdo_dbh.c.orig	Sat Dec 16 18:58:22 2006
+++ c:/tmp/pdo_dbh.c	Sat Dec 16 18:57:45 2006
@@ -1169,8 +1169,7 @@
     if (!dbh || !dbh->methods || !dbh->methods->get_driver_methods) {
         return 0;
-    funcs = dbh->methods->get_driver_methods(dbh,
+    funcs = dbh->methods->get_driver_methods(dbh, kind TSRMLS_CC);
     if (!funcs) {
         return 0;


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-10-24 18:01 UTC]
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on

In case this was a website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PECL better.

Fixed in PHP 5.2.7
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 16 01:01:28 2024 UTC